68% pre-publish-post-checklist

Code Review | Pre-Publish Post Checklist

WordPress plugin Pre-Publish Post Checklist scored68%from 54 tests.

About plugin

  • Plugin page: pre-publish-post-...
  • Plugin version: 3.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.0
  • WordPress version: 6.3.1
  • First release: Oct 30, 2014
  • Latest release: Nov 3, 2014
  • Number of updates: 14
  • Update frequency: every 0.3 days
  • Top authors: andrewjmead (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

200+ active /6,106 total downloads

Benchmarks

Plugin footprint 65% 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.02MB] [CPU: ▼1.17ms] Passed 4 tests

Analyzing server-side resources used by Pre-Publish Post Checklist
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0337.05 ▼4.47
Dashboard /wp-admin3.32 ▲0.0248.11 ▼3.38
Posts /wp-admin/edit.php3.37 ▲0.0247.30 ▲2.37
Add New Post /wp-admin/post-new.php5.92 ▲0.0393.16 ▲2.73
Media Library /wp-admin/upload.php3.25 ▲0.0233.41 ▲0.81
Pre-Publish Post Checklist /wp-admin/options-general.php?page=manage_publish_checklist3.2430.76

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 52 new files
Database: 2 new tables, 7 new options
New tables
pc_list_item_instance
pc_list_item
New WordPress options
widget_recent-posts
widget_theysaidso_widget
theysaidso_admin_options
pc_on_publish
widget_recent-comments
can_compress_scripts
db_upgraded

Browser metrics Passed 4 tests

A check of browser resources used by Pre-Publish Post Checklist
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,829 ▲7213.31 ▼1.121.92 ▼1.0139.84 ▼9.05
Dashboard /wp-admin2,213 ▲254.85 ▼0.06108.68 ▼7.4638.81 ▼5.71
Posts /wp-admin/edit.php2,093 ▲42.06 ▲0.0640.30 ▼0.1835.39 ▲0.75
Add New Post /wp-admin/post-new.php10,895 ▲9,36220.44 ▼2.911,011.73 ▲383.9437.24 ▼18.73
Media Library /wp-admin/upload.php1,386 ▼24.26 ▲0.0896.59 ▼2.5541.73 ▼1.63
Pre-Publish Post Checklist /wp-admin/options-general.php?page=manage_publish_checklist1,0002.5252.2030.60

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • Zombie tables detected upon uninstall: 2 tables
    • pc_list_item_instance
    • pc_list_item
  • This plugin does not fully uninstall, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded
    • 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
Even though everything seems fine, this is not an exhaustive test

SRP 0% 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
Almost there! Just fix the following items
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/pre-publish-post-checklist/inc/views/manage.php
  • 6× 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/pre-publish-post-checklist/inc/ajax.php:44
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/pre-publish-post-checklist/inc/ajax.php:44
    • > PHP Warning
      Use of undefined constant WP_PLUGIN_DIR - assumed 'WP_PLUGIN_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/pre-publish-post-checklist/index.php on line 13
    • > PHP Warning
      Use of undefined constant WP_PLUGIN_URL - assumed 'WP_PLUGIN_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/pre-publish-post-checklist/index.php on line 12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/pre-publish-post-checklist/inc/page-setups.php:44
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_basename() in wp-content/plugins/pre-publish-post-checklist/inc/plugin-actions.php:3

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, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
7 plugin tags: on publish, pre-publish checklist, confirm publish, checklist, prevent publish...

pre-publish-post-checklist/index.php 92% from 13 tests

The principal PHP file in "Pre-Publish Post Checklist" v. 3.1 is loaded by WordPress automatically on each request
Please take the time to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("pre-publish-post-checklist.php" instead of "index.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
No dangerous file extensions were detected8,835 lines of code in 48 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript221,4811,9437,035
Sass716369855
CSS18736514
PHP7110144341
Handlebars1174590

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.12
Average class complexity4.00
▷ Minimum class complexity3.00
▷ Maximum class complexity5.00
Average method complexity1.46
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods13
▷ Static methods00.00%
▷ Public methods1076.92%
▷ Protected methods215.38%
▷ Private methods17.69%
Functions16
▷ Named functions16100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
PNG images were not found in this plugin