72% custom-post-status

Code Review | Custom Post Status

WordPress plugin Custom Post Status scored72%from 54 tests.

About plugin

  • Plugin page: custom-post-status
  • Plugin version: 1.1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.5
  • WordPress version: 6.3.1
  • First release: Apr 29, 2016
  • Latest release: Apr 29, 2016
  • Number of updates: 12
  • Update frequency: every 0.5 days
  • Top authors: iaaxpage (100%)

Code review

54 tests

User reviews

1 review

Install metrics

80+ active /3,133 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Install script ran successfully

Server metrics [RAM: ▲0.23MB] [CPU: ▼2.88ms] Passed 4 tests

A check of server-side resources used by Custom Post Status
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.67 ▲0.2140.70 ▲2.08
Dashboard /wp-admin3.57 ▲0.2747.82 ▼2.94
Posts /wp-admin/edit.php3.62 ▲0.2745.28 ▲0.22
Add New Post /wp-admin/post-new.php6.11 ▲0.2385.01 ▼10.89
Media Library /wp-admin/upload.php3.43 ▲0.2036.35 ▲2.21
Custom Status Settings /wp-admin/tools.php?page=custom-status-settings3.7333.49

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 299 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
can_compress_scripts
theysaidso_admin_options
db_upgraded
widget_recent-posts
widget_recent-comments

Browser metrics Passed 4 tests

An overview of browser requirements for Custom Post Status
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲5813.27 ▼1.011.75 ▼0.1044.34 ▲1.44
Dashboard /wp-admin2,210 ▲225.86 ▲0.98113.20 ▼1.9843.28 ▲0.06
Posts /wp-admin/edit.php2,093 ▲12.02 ▲0.0133.15 ▼4.1234.46 ▲1.86
Add New Post /wp-admin/post-new.php1,536 ▼623.25 ▲4.83671.65 ▲40.3657.58 ▲0.16
Media Library /wp-admin/upload.php1,395 ▲74.18 ▼0.0399.19 ▲3.2639.94 ▼3.97
Custom Status Settings /wp-admin/tools.php?page=custom-status-settings7772.0524.1426.04

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 6 options
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Please fix the following server-side errors
    • > GET request to /wp-admin/tools.php?page=custom-status-settings
    • > Notice in wp-content/plugins/custom-post-status/vendor/mustache/mustache/src/Mustache/Parser.php+278
    Trying to access array offset on value of type null

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
Almost there! Just fix the following items
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/custom-post-status/vendor/mustache/mustache/bin/build_bootstrap.php
  • 169× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Twig_Node_Expression_Binary' not found in wp-content/plugins/custom-post-status/vendor/twig/twig/lib/Twig/Node/Expression/Binary/And.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'Twig_Node_Expression_Test' not found in wp-content/plugins/custom-post-status/vendor/twig/twig/lib/Twig/Node/Expression/Test/Null.php:21
    • > PHP Fatal error
      Uncaught Error: Class 'Twig_TokenParser' not found in wp-content/plugins/custom-post-status/vendor/twig/twig/lib/Twig/TokenParser/AutoEscape.php:30
    • > PHP Fatal error
      Uncaught Error: Class 'Twig_Node_Expression_Test' not found in wp-content/plugins/custom-post-status/vendor/twig/twig/lib/Twig/Node/Expression/Test/Defined.php:24
    • > PHP Fatal error
      Uncaught Error: Class 'Twig_Node' not found in wp-content/plugins/custom-post-status/vendor/twig/twig/lib/Twig/Node/Set.php:17
    • > PHP Fatal error
      Uncaught Error: Class 'Twig_Node' not found in wp-content/plugins/custom-post-status/vendor/twig/twig/lib/Twig/Node/CheckSecurity.php:15
    • > PHP Fatal error
      Uncaught Error: Class 'Twig_Node' not found in wp-content/plugins/custom-post-status/vendor/twig/twig/lib/Twig/Node/Flush.php:17
    • > PHP Fatal error
      Uncaught Error: Class 'Twig_TokenParser' not found in wp-content/plugins/custom-post-status/vendor/twig/twig/lib/Twig/TokenParser/Do.php:15
    • > PHP Fatal error
      Uncaught Error: Class 'Twig_Sandbox_SecurityError' not found in wp-content/plugins/custom-post-status/vendor/twig/twig/lib/Twig/Sandbox/SecurityNotAllowedFilterError.php:17
    • > PHP Fatal error
      Uncaught Error: Interface 'Mustache_Logger' not found in wp-content/plugins/custom-post-status/vendor/mustache/mustache/src/Mustache/Logger/AbstractLogger.php:21

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
3 plugin tags: post status, post, status

custom-post-status/init.php 92% from 13 tests

Analyzing the main PHP file in "Custom Post Status" version 1.1.0
Please make the necessary changes and fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("custom-post-status.php" instead of "init.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Good job! No executable or dangerous file extensions detected14,972 lines of code in 278 files:
LanguageFilesBlank linesComment linesLines of code
PHP2523,1017,20513,330
C1161174792
JSON800382
Markdown61680288
YAML313157
XML24038
PO File12220
JavaScript10019
Mustache12017
C/C++ Header171315
reStructuredText1519
m41215

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.41
Average class complexity7.76
▷ Minimum class complexity1.00
▷ Maximum class complexity121.00
Average method complexity2.48
▷ Minimum method complexity1.00
▷ Maximum method complexity51.00
Code structure
Namespaces9
Interfaces27
Traits0
Classes216
▷ Abstract classes2210.19%
▷ Concrete classes19489.81%
▷ Final classes31.55%
Methods1,191
▷ Static methods453.78%
▷ Public methods98482.62%
▷ Protected methods13311.17%
▷ Private methods746.21%
Functions54
▷ Named functions5194.44%
▷ Anonymous functions35.56%
Constants106
▷ Global constants10.94%
▷ Class constants10599.06%
▷ Public constants105100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
There were not PNG files found in your plugin