84% advanced-term-fields-locks

Code Review | Advanced Term Fields: Locks

WordPress plugin Advanced Term Fields: Locks scored84%from 54 tests.

About plugin

  • Plugin page: advanced-term-fie...
  • Plugin version: 0.1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-4.4.2
  • WordPress version: 6.3.1
  • First release: Mar 18, 2016
  • Latest release: Mar 18, 2016
  • Number of updates: 3
  • Update frequency: every 7.0 days
  • Top authors: dbmartin (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /763 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.00MB] [CPU: ▼9.10ms] Passed 4 tests

A check of server-side resources used by Advanced Term Fields: Locks
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0040.08 ▼1.75
Dashboard /wp-admin3.31 ▲0.0044.82 ▼5.26
Posts /wp-admin/edit.php3.36 ▲0.0053.03 ▲3.60
Add New Post /wp-admin/post-new.php5.89 ▲0.0084.79 ▼31.73
Media Library /wp-admin/upload.php3.23 ▲0.0036.40 ▲2.34

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 15 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
can_compress_scripts
db_upgraded
widget_recent-comments
widget_theysaidso_widget
theysaidso_admin_options

Browser metrics Passed 4 tests

Advanced Term Fields: Locks: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲314.36 ▲0.221.54 ▼0.6341.56 ▼3.45
Dashboard /wp-admin2,195 ▲245.60 ▲0.0394.81 ▲4.2343.90 ▲1.10
Posts /wp-admin/edit.php2,103 ▼02.01 ▲0.0040.18 ▲0.6639.65 ▲0.89
Add New Post /wp-admin/post-new.php1,535 ▲718.46 ▼4.72625.47 ▼78.0365.50 ▲9.11
Media Library /wp-admin/upload.php1,403 ▼04.19 ▲0.0295.44 ▼21.9543.70 ▼8.21

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts

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
Good news, no errors were detected

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
Almost there! Just fix the following items
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/advanced-term-fields-locks/views/inner-edit-form-field.php:13
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/advanced-term-fields-locks/views/inner-add-form-field.php:13

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
7 plugin tags: termmeta, term_meta, meta, metadata, lock...

advanced-term-fields-locks/advanced-term-fields-locks.php 92% from 13 tests

The entry point to "Advanced Term Fields: Locks" version 0.1.0 is a PHP file that has certain tags in its header comment area
Please make the necessary changes and fix the following:
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Everything looks great! No dangerous files found in this plugin409 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP6161561355
Markdown124034
CSS10015
JavaScript1215

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.25
Average class complexity37.00
▷ Minimum class complexity37.00
▷ Maximum class complexity37.00
Average method complexity2.33
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods27
▷ Static methods00.00%
▷ Public methods2696.30%
▷ Protected methods13.70%
▷ Private methods00.00%
Functions6
▷ Named functions583.33%
▷ Anonymous functions116.67%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
There were not PNG files found in your plugin