79% add-categories-to-pages

Code Review | Add Categories to Pages

WordPress plugin Add Categories to Pages scored79%from 54 tests.

About plugin

  • Plugin page: add-categories-to...
  • Plugin version: 0.1
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.2-5.3
  • WordPress version: 6.3.1
  • First release: Oct 11, 2019
  • Latest release: Nov 24, 2019
  • Number of updates: 3
  • Update frequency: every 14.7 days
  • Top authors: christosgam (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active /589 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.01MB] [CPU: ▼3.51ms] Passed 4 tests

An overview of server-side resources used by Add Categories to Pages
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0138.13 ▼2.46
Dashboard /wp-admin3.31 ▲0.0148.51 ▼6.95
Posts /wp-admin/edit.php3.37 ▲0.0152.19 ▼0.97
Add New Post /wp-admin/post-new.php5.91 ▲0.0295.59 ▲3.44
Media Library /wp-admin/upload.php3.24 ▲0.0037.17 ▼3.64
Categories /wp-admin/edit-tags.php?taxonomy=category&post_type=page3.2340.49

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 2 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-comments
can_compress_scripts
widget_recent-posts
category_children
theysaidso_admin_options
widget_theysaidso_widget
db_upgraded

Browser metrics Passed 4 tests

This is an overview of browser requirements for Add Categories to Pages
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲6913.29 ▼0.744.37 ▲2.7642.03 ▼6.67
Dashboard /wp-admin2,213 ▲284.87 ▼0.92106.12 ▼29.4137.38 ▼6.42
Posts /wp-admin/edit.php2,093 ▲11.98 ▼0.0237.26 ▼2.1033.41 ▼1.59
Add New Post /wp-admin/post-new.php1,536 ▲321.17 ▼2.01645.77 ▼8.3781.16 ▼6.06
Media Library /wp-admin/upload.php1,392 ▲44.10 ▼0.08106.42 ▼34.9843.73 ▼6.96
Categories /wp-admin/edit-tags.php?taxonomy=category&post_type=page1,4472.1334.4431.73

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • Zombie WordPress options were found after uninstall: 7 options
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts
    • category_children
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Almost there, just fix the following server-side errors
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/edit-tags.php?taxonomy=category&post_type=page
    • > POST request to /wp-cron.php?doing_wp_cron=1696658530.1360850334167480468750
    • > Notice in wp-content/plugins/pressforward/Core/Utility/Retrieval.php+204
    Undefined offset: 0
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/edit-tags.php?taxonomy=category&post_type=page
    • > POST request to /wp-cron.php?doing_wp_cron=1696658530.1360850334167480468750
    • > Notice in wp-content/plugins/pressforward/Core/Utility/Retrieval.php+205
    Trying to get property 'guid' of non-object
  • 12 occurences, only the last one shown
    • > GET request to /wp-admin/edit-tags.php?taxonomy=category&post_type=page
    • > POST request to /wp-cron.php?doing_wp_cron=1696658530.1360850334167480468750
    • > Notice in wp-content/plugins/pressforward/Core/Utility/Retrieval.php+221
    Trying to get property 'ID' of non-object
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/edit-tags.php?taxonomy=category&post_type=page
    • > POST request to /wp-cron.php?doing_wp_cron=1696658530.1360850334167480468750
    • > Notice in wp-content/plugins/pressforward/Core/Utility/Retrieval.php+222
    Trying to get property 'post_title' of non-object

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions 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-to-pages/add-categories-to-pages.php:20

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 on the user side

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
There were no plugin tags found

add-categories-to-pages/add-categories-to-pages.php Passed 13 tests

The main PHP file in "Add Categories to Pages" ver. 0.1 adds more information about the plugin and also serves as the entry point for this plugin
57 characters long description:
With this plugin you can finally add categories to pages.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
No dangerous file extensions were detected10 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP141410

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.25
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
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

Often times overlooked, PNG files can occupy unnecessary space in your plugin
There are no PNG files in this plugin