77% custom-category-and-page-extensions

Code Review | Custom category and page extensions

WordPress plugin Custom category and page extensions scored77%from 54 tests.

About plugin

  • Plugin page: custom-category-a...
  • Plugin version: 0.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.4.2
  • WordPress version: 6.3.1
  • First release: Mar 7, 2016
  • Latest release: Mar 6, 2016
  • Number of updates: 5
  • Update frequency: every 1.4 days
  • Top authors: highimpacttech (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /953 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.05MB] [CPU: ▼4.06ms] Passed 4 tests

This is a short check of server-side resources used by Custom category and page extensions
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0338.12 ▼4.81
Dashboard /wp-admin3.36 ▲0.0651.28 ▼1.82
Posts /wp-admin/edit.php3.45 ▲0.1050.72 ▲6.79
Add New Post /wp-admin/post-new.php5.94 ▲0.0583.82 ▼16.38
Media Library /wp-admin/upload.php3.28 ▲0.0541.23 ▲7.64
Custom category and page extensions /wp-admin/options-general.php?page=hit-wp-ccpe3.2535.41

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 9 new files
Database: no new tables, 7 new options
New WordPress options
theysaidso_admin_options
widget_recent-posts
widget_recent-comments
widget_theysaidso_widget
ccpe_extension_to_use
db_upgraded
can_compress_scripts

Browser metrics Passed 4 tests

Checking browser requirements for Custom category and page extensions
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲5814.48 ▲0.101.81 ▲0.0144.39 ▼0.93
Dashboard /wp-admin2,210 ▲194.88 ▼0.99103.12 ▼14.6238.14 ▼2.93
Posts /wp-admin/edit.php2,096 ▲72.00 ▼0.0436.39 ▼1.0533.28 ▼0.31
Add New Post /wp-admin/post-new.php1,536 ▲323.46 ▲0.29660.59 ▲49.5762.38 ▲10.24
Media Library /wp-admin/upload.php1,392 ▲74.20 ▲0.0196.08 ▲1.2643.91 ▲1.94
Custom category and page extensions /wp-admin/options-general.php?page=hit-wp-ccpe8062.0226.4128.48

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • The uninstall procedure has failed, leaving 7 options in the database
    • db_upgraded
    • ccpe_extension_to_use
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
The following issues need your attention
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/custom-category-and-page-extensions/hit-wp-ccpe.php
  • 2× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/custom-category-and-page-extensions/inc/ccpe-admin-interface.php:53
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/custom-category-and-page-extensions/inc/hit-plugin-core.php:52

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 83% from 29 tests

readme.txt 88% 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
Attributes that require attention:
  • Contributors: No valid plugin tags found
  • Contributors: Plugin contributors not specified
You can take inspiration from this readme.txt

custom-category-and-page-extensions/hit-wp-ccpe.php 77% from 13 tests

"Custom category and page extensions" version 0.0.1's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please take the time to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("custom-category-and-page-extensions.php" instead of "hit-wp-ccpe.php")
  • Domain Path: The domain path folder was not found ("/languages")
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Good job! No executable or dangerous file extensions detected201 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP427130178
Markdown120023

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.39
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%
Functions15
▷ Named functions15100.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
No PNG files were detected