94% limit-taxonomy-term-count

Code Review | Limit taxonomy term count

WordPress plugin Limit taxonomy term count scored 94% from 53 tests.

About plugin

  • Plugin page: limit-taxonomy-te...
  • Plugin version: 1.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-4.9.8
  • WordPress version: 5.8.1
  • First release: Oct 23, 2018
  • Latest release: Oct 23, 2018
  • Number of updates: 5
  • Update frequency: every 0.2 days
  • Top authors: dahousecatz (100%)

Code review

53 tests

User reviews

1 review

Install metrics

10+ active / 344 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Installer ran successfully

Server metrics [RAM: ▲0.02MB] [CPU: ▼262.47ms] Passed 4 tests

Analyzing server-side resources used by Limit taxonomy term count
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.86 ▲0.0232.11 ▼1.22
Dashboard /wp-admin3.08 ▲0.0339.28 ▼5.33
Posts /wp-admin/edit.php3.13 ▲0.0344.45 ▲1.75
Add New Post /wp-admin/post-new.php5.44 ▲0.0290.87 ▼1,039.22
Media Library /wp-admin/upload.php3.02 ▲0.0234.52 ▼4.09

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Limit taxonomy term count
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,656 ▲5016.07 ▲0.558.58 ▲0.3948.17 ▼1.53
Dashboard /wp-admin2,940 ▲906.23 ▲0.25142.73 ▲10.2298.21 ▼3.32
Posts /wp-admin/edit.php2,710 ▲42.95 ▲0.2864.56 ▼2.7888.46 ▼4.28
Add New Post /wp-admin/post-new.php1,659 ▲18019.02 ▲0.88372.91 ▲6.54102.91 ▲0.93
Media Library /wp-admin/upload.php1,776 ▲45.41 ▲0.41158.86 ▲3.96117.45 ▲4.47

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
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 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 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please take a closer look at the following
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/limit-taxonomy-term-count/limit-taxonomy-term-count.php:25

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 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
These attributes need your attention:
  • Screenshots: Add images for these screenshots: #1 (Shows selecting a tag when limit is set to 1.), #2 (Shows selecting a tag when limit is set to 2.)
The official readme.txt might help

limit-taxonomy-term-count/limit-taxonomy-term-count.php Passed 13 tests

This is the main PHP file of "Limit taxonomy term count" version 1.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
69 characters long description:
Allows the use of the "limit" argument when calling register_taxonomy

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
No dangerous file extensions were detected123 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP1245599
JavaScript28323
CSS1001

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.46
Average class complexity19.00
▷ Minimum class complexity19.00
▷ Maximum class complexity19.00
Average method complexity3.57
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods7
▷ Static methods00.00%
▷ Public methods571.43%
▷ Protected methods00.00%
▷ Private methods228.57%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 1 test

Image compression Passed 1 test

PNG files should be compressed to save space and minimize bandwidth usage
2 PNG files occupy 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot2.png5.18KB2.88KB▼ 44.45%
screenshot1.png4.62KB2.61KB▼ 43.59%