89% wp-term-locks

Code Review | WP Term Locks

WordPress plugin WP Term Locks scored89%from 54 tests.

About plugin

  • Plugin page: wp-term-locks
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-4.8
  • WordPress version: 6.3.1
  • First release: Jan 7, 2016
  • Latest release: Dec 9, 2016
  • Number of updates: 5
  • Update frequency: every 67.2 days
  • Top authors: johnjamesjacoby (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /2,025 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.04MB] [CPU: ▼5.97ms] Passed 4 tests

This is a short check of server-side resources used by WP Term Locks
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0551.68 ▲8.38
Dashboard /wp-admin3.35 ▲0.0452.18 ▲1.80
Posts /wp-admin/edit.php3.46 ▲0.1145.76 ▼3.66
Add New Post /wp-admin/post-new.php5.93 ▲0.0484.40 ▼19.32
Media Library /wp-admin/upload.php3.27 ▲0.0436.46 ▼2.71

Server storage [IO: ▲0.02MB] [DB: ▲0.31MB] Passed 3 tests

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 4 new files
Database: no new tables, 7 new options
New WordPress options
widget_theysaidso_widget
widget_recent-posts
theysaidso_admin_options
can_compress_scripts
wpdb_term_locks_version
db_upgraded
widget_recent-comments

Browser metrics Passed 4 tests

Checking browser requirements for WP Term Locks
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.35 ▲0.081.77 ▼0.0541.74 ▼1.47
Dashboard /wp-admin2,198 ▲215.65 ▲0.0389.46 ▼8.4239.75 ▼6.43
Posts /wp-admin/edit.php2,100 ▼01.96 ▼0.0135.92 ▲0.8233.71 ▼5.24
Add New Post /wp-admin/post-new.php1,535 ▲718.18 ▼4.84610.24 ▼56.3065.46 ▲2.79
Media Library /wp-admin/upload.php1,400 ▲34.20 ▼0.01100.25 ▼7.1845.19 ▼0.92

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts
    • wpdb_term_locks_version
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Looking good! No server-side errors or output on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
These attributes need to be fixed:
  • Screenshots: Screenshot #1 (Category Locks) image not found
The official readme.txt might help

wp-term-locks/wp-term-locks.php 92% from 13 tests

"WP Term Locks" version 1.0.1's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please make the necessary changes and fix the following:
  • Domain Path: The domain path is invalid: folder "/wp-term-locks/assets/languages/" does not exist

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Everything looks great! No dangerous files found in this plugin392 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP3166427392

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity28.50
▷ Minimum class complexity24.00
▷ Maximum class complexity33.00
Average method complexity2.62
▷ Minimum method complexity1.00
▷ Maximum method complexity14.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes150.00%
Methods34
▷ Static methods00.00%
▷ Public methods2985.29%
▷ Protected methods38.82%
▷ Private methods25.88%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

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