10% categories-page

Code Review | Categories Page

WordPress plugin Categories Page scored10%from 54 tests.

About plugin

  • Plugin page: categories-page
  • Plugin version: 1...
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-4.3
  • WordPress version: 6.3.1
  • First release: Nov 20, 2015
  • Latest release: Nov 20, 2015
  • Number of updates: 6
  • Update frequency: N/A
  • Top authors: mervinpraison (100%)

Code review

54 tests

User reviews

1 review

Install metrics

60+ active /2,948 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
It is recommended to fix the following installer errors
  • The plugin cannot be installed
    • > Deprecated in wp-content/plugins/categories-page/categories-page.php+19
    Function create_function() is deprecated

Server metrics [RAM: ▼1.82MB] [CPU: ▼58.11ms] Passed 4 tests

Analyzing server-side resources used by Categories Page
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.16 ▼1.305.04 ▼35.14
Dashboard /wp-admin2.18 ▼1.126.03 ▼45.90
Posts /wp-admin/edit.php2.18 ▼1.176.68 ▼39.17
Add New Post /wp-admin/post-new.php2.18 ▼3.705.95 ▼112.22
Media Library /wp-admin/upload.php2.18 ▼1.056.30 ▼29.46

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Categories Page
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,906 ▲17113.94 ▼0.698.48 ▲6.5640.21 ▼5.67
Dashboard /wp-admin2,206 ▲185.89 ▲1.0099.16 ▼18.1136.19 ▼5.81
Posts /wp-admin/edit.php2,089 ▼02.01 ▲0.0340.47 ▲0.7934.69 ▼0.48
Add New Post /wp-admin/post-new.php1,536 ▲323.49 ▲0.05634.77 ▼23.8855.83 ▲2.35
Media Library /wp-admin/upload.php1,388 ▲34.19 ▼0.05100.19 ▼12.9043.21 ▼5.81

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • Uninstall procedure had uncaught errors
    • > Deprecated in wp-content/plugins/categories-page/categories-page.php+19
    Function create_function() is deprecated
  • The uninstall procedure has failed, leaving 7 options in the database
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options
    • tags_page_version
    • widget_theysaidso_widget
    • widget_recent-comments

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
The smoke test was a success, however most plugin functionality was not tested

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
  • 4× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Warning
      include_once(ABSPATHwp-admin/includes/plugin.php): failed to open stream: No such file or directory in wp-content/plugins/categories-page/categories-page.php on line 12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/categories-page/categories-page.php:19
    • > PHP Warning
      include_once(): Failed opening 'ABSPATHwp-admin/includes/plugin.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/categories-page/categories-page.php on line 12
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/categories-page/categories-page.php on line 12

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 90% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Attributes that require attention:
  • Screenshots: Add an image for screenshot #1 (Shortcode being added on to the content area.)
  • Tags: Please delete some tags, you are using 16 tag instead of maximum 10
The official readme.txt might help

categories-page/categories-page.php 92% from 13 tests

"Categories Page" version 1...'s primary PHP file adds more information about the plugin and serves as the entry point for WordPress
It is important to fix the following:
  • Version: Use periods and digits only for your plugin's version number (ex. "1.0.3" instead of "1...")

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
Good job! No executable or dangerous file extensions detected556 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
PHP14624324
JavaScript42811112
CSS418085
PO File1121435

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity64.00
▷ Minimum class complexity64.00
▷ Maximum class complexity64.00
Average method complexity4.94
▷ Minimum method complexity1.00
▷ Maximum method complexity21.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods16
▷ Static methods16.25%
▷ Public methods1487.50%
▷ Protected methods00.00%
▷ Private methods212.50%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants00.00%
▷ Class constants1100.00%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
No PNG images were found in this plugin