10% approval-workflow

Code Review | Approval Workflow

WordPress plugin Approval Workflow scored10%from 54 tests.

About plugin

  • Plugin page: approval-workflow
  • Plugin version: 1.3.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-3.4
  • WordPress version: 6.3.1
  • First release: Apr 27, 2012
  • Latest release: Aug 15, 2012
  • Number of updates: 12
  • Update frequency: every 9.2 days
  • Top authors: ericjuden (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /6,678 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
You still need to fix the following installer errors
  • Install procedure had errors
    • > Deprecated in wp-content/plugins/approval-workflow/approval-workflow.php+19
    Methods with the same name as their class will not be constructors in a future version of PHP; Approval_Workflow has a deprecated constructor

Server metrics [RAM: ▼1.85MB] [CPU: ▼53.22ms] Passed 4 tests

Server-side resources used by Approval Workflow
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.14 ▼1.325.23 ▼34.98
Dashboard /wp-admin2.16 ▼1.155.68 ▼43.37
Posts /wp-admin/edit.php2.16 ▼1.207.09 ▼43.69
Add New Post /wp-admin/post-new.php2.16 ▼3.736.20 ▼90.84
Media Library /wp-admin/upload.php2.16 ▼1.075.42 ▼28.51
Approval Workflow /wp-admin/options-general.php?page=approval-workflow-options2.165.51

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 8 new files
Database: no new tables, 7 new options
New WordPress options
approval-workflow
theysaidso_admin_options
db_upgraded
can_compress_scripts
widget_recent-comments
widget_recent-posts
widget_theysaidso_widget

Browser metrics Passed 4 tests

This is an overview of browser requirements for Approval Workflow
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,808 ▲4714.36 ▲0.072.00 ▲0.1044.83 ▲3.41
Dashboard /wp-admin2,202 ▲255.56 ▼0.0789.34 ▼2.1477.03 ▲27.90
Posts /wp-admin/edit.php2,122 ▲192.03 ▲0.0038.65 ▼1.8134.79 ▲2.50
Add New Post /wp-admin/post-new.php1,556 ▲3023.37 ▲0.21683.62 ▼5.20167.16 ▲111.23
Media Library /wp-admin/upload.php1,416 ▲194.15 ▼0.0598.16 ▼18.8263.70 ▲19.37
Approval Workflow /wp-admin/options-general.php?page=approval-workflow-options8761.9923.8340.80

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
  • Uninstall procedure had uncaught errors
    • > Deprecated in wp-content/plugins/approval-workflow/approval-workflow.php+19
    Methods with the same name as their class will not be constructors in a future version of PHP; Approval_Workflow has a deprecated constructor
  • Zombie WordPress options were found after uninstall: 7 options
    • approval-workflow
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Smoke test failed, please fix the following
    • > GET request to /wp-admin/options-general.php?page=approval-workflow-options
    • > Deprecated in wp-content/plugins/approval-workflow/approval-workflow.php+19
    Methods with the same name as their class will not be constructors in a future version of PHP; Approval_Workflow has a deprecated constructor
    • > GET request to /wp-admin/options-general.php?page=approval-workflow-options
    • > Deprecated in wp-content/plugins/approval-workflow/options.class.php+2
    Methods with the same name as their class will not be constructors in a future version of PHP; Approval_Workflow_Options has a deprecated constructor

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
The following issues need your attention
  • 5× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > 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/approval-workflow/approval-workflow.php on line 13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/approval-workflow/approval-workflow.php:14
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/approval-workflow/class/workflow-list-table.php on line 4
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/class-wp-list-table.php): failed to open stream: No such file or directory in wp-content/plugins/approval-workflow/class/workflow-list-table.php on line 4
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/class-wp-list-table.php' (include_path='.:/usr/share/php') in wp-content/plugins/approval-workflow/class/workflow-list-table.php on line 4

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Please fix the following attributes:
  • Screenshots: Please add images for these screenshots: #1 (Added a checkbox to the edit page for submitting to the workflow.), #2 (Approval Workflow dashboard. This shows all the items in the workflow.), #3 (Comparing the old and new pages.)
You can take inspiration from this readme.txt

approval-workflow/approval-workflow.php 92% from 13 tests

The main PHP script in "Approval Workflow" version 1.3.2 is automatically included on every request by WordPress
Please take the time to fix the following:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 153 characters long)

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
Success! There were no dangerous files found in this plugin416 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP39541416

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity13.25
▷ Minimum class complexity1.00
▷ Maximum class complexity33.00
Average method complexity2.40
▷ Minimum method complexity1.00
▷ Maximum method complexity13.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods35
▷ Static methods00.00%
▷ Public methods35100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.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
4 PNG files occupy 0.08MB with 0.03MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-2.png21.54KB8.62KB▼ 59.99%
images/arrow_join.png0.61KB0.62KB0.00%
screenshot-1.png9.55KB4.65KB▼ 51.32%
screenshot-3.png46.49KB16.68KB▼ 64.12%