78% add-categories-post-footer

Code Review | Add Categories Post Footer

WordPress plugin Add Categories Post Footer scored 78% from 54 tests.

About plugin

  • Plugin page: add-categories-po...
  • Plugin version: 2.2.2
  • PHP version: 7.4.16
  • WordPress compatibility: 2.2.2-2.6.4
  • WordPress version: 5.8.1
  • First release: Sep 22, 2014
  • Latest release: Sep 22, 2014
  • Number of updates: 9
  • Update frequency: every 0.3 days
  • Top authors: nikhilvaghela (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

70+ active / 2,244 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▼0.88MB] [CPU: ▼173.08ms] Passed 4 tests

A check of server-side resources used by Add Categories Post Footer
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.84 ▲0.0133.13 ▼6.83
Dashboard /wp-admin2.77 ▼0.2926.96 ▼19.48
Posts /wp-admin/edit.php2.77 ▼0.3424.95 ▼24.76
Add New Post /wp-admin/post-new.php2.77 ▼2.6722.11 ▼635.83
Media Library /wp-admin/upload.php2.77 ▼0.2322.94 ▼12.24
Categories Post Footer /wp-admin/options-general.php?page=add-categories-post-footer/add_categories_post_footer.php2.7720.56

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 3 new files
Database: no new tables, 1 new option
New WordPress options
add_cat_post_footer_opts

Browser metrics Passed 4 tests

An overview of browser requirements for Add Categories Post Footer
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,710 ▲11415.78 ▲0.178.59 ▼2.7049.31 ▼4.21
Dashboard /wp-admin2,977 ▲435.89 ▼0.18156.44 ▼0.07118.17 ▲4.50
Posts /wp-admin/edit.php2,743 ▲42.68 ▼0.0170.32 ▲2.1195.93 ▼4.59
Add New Post /wp-admin/post-new.php1,609 ▼7419.01 ▲0.20396.85 ▲0.72110.01 ▼9.11
Media Library /wp-admin/upload.php1,814 ▲75.02 ▲0.00168.63 ▲9.18126.92 ▼0.74
Categories Post Footer /wp-admin/options-general.php?page=add-categories-post-footer/add_categories_post_footer.php1,0692.0863.2467.47

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Please fix the following items
  • This plugin did not uninstall without warnings or errors
    • > User deprecated in wp-includes/functions.php+5495
    has_cap was called with an argument that is deprecated since version 2.0.0! Usage of user levels is deprecated. Use capabilities instead.

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Smoke test failed, please fix the following
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=add-categories-post-footer/add_categories_post_footer.php
    • > User deprecated in wp-includes/functions.php+5495
    has_cap was called with an argument that is deprecated since version 2.0.0! Usage of user levels is deprecated. Use capabilities instead.

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
Please fix the following
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/add-categories-post-footer/add_categories_post_footer.php:18

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
4 plugin tags: post footer, related post, tags, advertisment

add-categories-post-footer/add_categories_post_footer.php 92% from 13 tests

The main PHP script in "Add Categories Post Footer" version 2.2.2 is automatically included on every request by WordPress
The following require your attention:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("add-categories-post-footer.php" instead of "add_categories_post_footer.php")

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
Success! There were no dangerous files found in this plugin229 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP14425210
CSS10119

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.15
Average class complexity13.00
▷ Minimum class complexity13.00
▷ Maximum class complexity13.00
Average method complexity2.09
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods11
▷ Static methods00.00%
▷ Public methods11100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.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