94% advanced-term-fields-locks

Code Review | Advanced Term Fields: Locks

WordPress plugin Advanced Term Fields: Locks scored 94% 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: 5.9.2
  • 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 / 619 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

Server metrics [RAM: ▼0.02MB] [CPU: ▼288.65ms] 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.52 ▲0.0155.21 ▲8.73
Dashboard /wp-admin3.41 ▲0.0033.24 ▼0.22
Posts /wp-admin/edit.php3.64 ▲0.0038.50 ▲2.48
Add New Post /wp-admin/post-new.php6.89 ▼0.0895.35 ▼1,151.86
Media Library /wp-admin/upload.php3.29 ▼0.0123.98 ▼5.00

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 15 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

A check of browser resources used by Advanced Term Fields: Locks
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,763 ▲4115.91 ▼0.085.73 ▼0.552.37 ▼0.03
Dashboard /wp-admin2,892 ▲346.11 ▼0.06118.83 ▼15.95152.47 ▼6.81
Posts /wp-admin/edit.php2,688 ▼63.24 ▼0.0063.14 ▼0.88142.10 ▲0.72
Add New Post /wp-admin/post-new.php1,690 ▲2920.72 ▲4.89441.94 ▲18.15159.30 ▼0.76
Media Library /wp-admin/upload.php1,695 ▼35.50 ▼0.02140.09 ▼3.57181.73 ▼4.97

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 successfully, without leaving any zombie files or tables

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following items
  • 2× PHP files trigger server-side errors or warnings when accessed directly:
    • > 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 a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
7 plugin tags: taxonomy, termmeta, term_meta, metadata, term...

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

Analyzing the main PHP file in "Advanced Term Fields: Locks" version 0.1.0
The following require your attention:
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
No dangerous file extensions were detected409 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP6161561355
Markdown124034
CSS10015
JavaScript1215

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity issues
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

Often times overlooked, PNG files can occupy unnecessary space in your plugin
PNG images were not found in this plugin