94% acf-template-tags-for-siteorigin

Code Review | Template Builder for SiteOrigin

WordPress plugin Template Builder for SiteOrigin scored 94% from 53 tests.

About plugin

  • Plugin page: acf-template-tags...
  • Plugin version: 1.0.3
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9-5.0.3
  • WordPress version: 5.8.1
  • First release: Dec 2, 2018
  • Latest release: Jan 10, 2019
  • Number of updates: 8
  • Update frequency: every 4.9 days
  • Top authors: echelonso (100%)

Code review

53 tests

User reviews

1 review

Install metrics

100+ active / 1,257 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.38MB] [CPU: ▼262.93ms] Passed 4 tests

Analyzing server-side resources used by Template Builder for SiteOrigin
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.96 ▲0.2439.10 ▲18.37
Dashboard /wp-admin3.57 ▲0.5149.25 ▲3.50
Posts /wp-admin/edit.php3.58 ▲0.4746.62 ▲4.51
Add New Post /wp-admin/post-new.php5.83 ▲0.4098.53 ▼1,056.39
Media Library /wp-admin/upload.php3.41 ▲0.4036.50 ▼3.34
Install Plugins /wp-admin/plugins.php?page=tgmpa-install-plugins3.5731.77

Server storage [IO: ▲0.74MB] [DB: ▲0.00MB] Passed 3 tests

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 127 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

An overview of browser requirements for Template Builder for SiteOrigin
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,711 ▲10516.22 ▲0.417.72 ▼2.3349.26 ▲6.15
Dashboard /wp-admin2,995 ▲1466.02 ▲0.02135.18 ▼2.89105.11 ▲1.85
Posts /wp-admin/edit.php2,776 ▲702.74 ▲0.0664.09 ▼2.83104.26 ▲11.03
Add New Post /wp-admin/post-new.php1,901 ▲1917.45 ▼1.76375.82 ▲1.41118.13 ▼0.33
Media Library /wp-admin/upload.php1,848 ▲765.05 ▲0.05136.90 ▼10.85121.46 ▲8.49
Install Plugins /wp-admin/plugins.php?page=tgmpa-install-plugins1,3582.4766.0088.47

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The plugin uninstalled completely, with no zombie files or tables

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
The following issues need your attention
  • 113× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_kses_post() in wp-content/plugins/acf-template-tags-for-siteorigin/widgets/func/func-the_category/tpl/tpl.php:20
    • > PHP Fatal error
      Uncaught Error: Class 'SiteOrigin_Widget' not found in wp-content/plugins/acf-template-tags-for-siteorigin/widgets/func/func-the_post_thumbnail/func-the_post_thumbnail.php:9
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/acf-template-tags-for-siteorigin/widgets/acf/acf-text/tpl/tpl.php on line 5
    • > PHP Fatal error
      Uncaught Error: Class 'SiteOrigin_Widget' not found in wp-content/plugins/acf-template-tags-for-siteorigin/widgets/func/func-the_archive_description/func-the_archive_description.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'SiteOrigin_Widget' not found in wp-content/plugins/acf-template-tags-for-siteorigin/widgets/func/func-the_posts_pagination/func-the_posts_pagination.php:9
    • > PHP Fatal error
      Uncaught Error: Call to a member function get_acf_field_object() on null in wp-content/plugins/acf-template-tags-for-siteorigin/widgets/acf/acf-email/tpl/tpl.php:12
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/acf-template-tags-for-siteorigin/widgets/eso/eso-loop-layout/tpl/tpl.php on line 2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function the_archive_description() in wp-content/plugins/acf-template-tags-for-siteorigin/widgets/func/func-the_archive_description/tpl/tpl.php:2
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/acf-template-tags-for-siteorigin/widgets/func/func-the_excerpt/tpl/tpl.php on line 3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/acf-template-tags-for-siteorigin/inc/settings.php:8

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
Attributes that need to be fixed:
  • Requires php: Invalid version format
You can take inspiration from this readme.txt

acf-template-tags-for-siteorigin/acf-template-tags-for-siteorigin.php Passed 13 tests

The main PHP script in "Template Builder for SiteOrigin" version 1.0.3 is automatically included on every request by WordPress
39 characters long description:
Build your themes templates SiteOrigin.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Everything looks great! No dangerous files found in this plugin10,715 lines of code in 108 files:
LanguageFilesBlank linesComment linesLines of code
PHP891,5301,9625,746
PO File171,4491,9934,842
JSON100105
JavaScript15022

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.39
Average class complexity8.76
▷ Minimum class complexity1.00
▷ Maximum class complexity206.00
Average method complexity2.19
▷ Minimum method complexity1.00
▷ Maximum method complexity34.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes45
▷ Abstract classes00.00%
▷ Concrete classes45100.00%
▷ Final classes00.00%
Methods293
▷ Static methods51.71%
▷ Public methods27092.15%
▷ Protected methods237.85%
▷ Private methods00.00%
Functions11
▷ Named functions327.27%
▷ Anonymous functions872.73%
Constants3
▷ Global constants00.00%
▷ Class constants3100.00%
▷ Public constants3100.00%

Plugin size Passed 1 test

Image compression Passed 1 test

Using a strong compression for your PNG files is a great way to speed-up your plugin
There were not PNG files found in your plugin