78% revisionary

Code Review | PublishPress Revisions: Duplicate Posts, Submit, Approve and Schedule Content Changes

WordPress plugin PublishPress Revisions: Duplicate Posts, Submit, Approve and Schedule Content Changes scored78%from 54 tests.

About plugin

  • Plugin page: revisionary
  • Plugin version: 3.5.4
  • PHP compatiblity: 7.2.5+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.5-6.3
  • WordPress version: 6.3.1
  • First release: Dec 14, 2009
  • Latest release: Oct 25, 2023
  • Number of updates: 427
  • Update frequency: every 11.9 days
  • Top authors: kevinB (92.27%)stevejburge (4.92%)publishpress (3.28%)

Code review

54 tests

User reviews

45 reviews

Install metrics

10,000+ active /354,433 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: ▲1.20MB] [CPU: ▲12.93ms] Passed 4 tests

A check of server-side resources used by PublishPress Revisions: Duplicate Posts, Submit, Approve and Schedule Content Changes
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /4.54 ▲1.0850.60 ▲14.32
Dashboard /wp-admin4.58 ▲1.2857.84 ▲9.24
Posts /wp-admin/edit.php4.68 ▲1.3256.99 ▲10.20
Add New Post /wp-admin/post-new.php7.14 ▲1.25109.73 ▲25.47
Media Library /wp-admin/upload.php4.43 ▲1.2050.65 ▲17.97
Revision Queue /wp-admin/admin.php?page=revisionary-q4.9252.93
Revision Archive /wp-admin/admin.php?page=revisionary-archive4.6246.11
Settings /wp-admin/admin.php?page=revisionary-settings4.8644.50
Upgrade to Pro /wp-admin/admin.php?page=revisionary-pro4.8443.42

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 149 new files
Database: no new tables, 10 new options
New WordPress options
db_upgraded
revisionary_wp_reviews_installed_on
widget_recent-posts
rvy_scheduled_publish_cron
theysaidso_admin_options
can_compress_scripts
revisionary_last_version
widget_recent-comments
widget_theysaidso_widget
rvy_wp_cron_usage_detected

Browser metrics Passed 4 tests

A check of browser resources used by PublishPress Revisions: Duplicate Posts, Submit, Approve and Schedule Content Changes
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,837 ▲7614.38 ▲0.001.92 ▲0.2134.00 ▼9.43
Dashboard /wp-admin2,234 ▲605.57 ▼0.0085.02 ▼3.6639.51 ▼5.56
Posts /wp-admin/edit.php2,146 ▲462.06 ▲0.1236.17 ▲1.4534.40 ▼4.08
Add New Post /wp-admin/post-new.php1,566 ▲3123.27 ▲5.17666.76 ▲23.9654.19 ▼11.57
Media Library /wp-admin/upload.php1,445 ▲454.24 ▲0.0296.00 ▼0.7045.33 ▲1.82
Revision Queue /wp-admin/admin.php?page=revisionary-q1,1371.7528.3240.20
Revision Archive /wp-admin/admin.php?page=revisionary-archive1,0942.1224.3536.41
Settings /wp-admin/admin.php?page=revisionary-settings1,7342.2627.4345.86
Upgrade to Pro /wp-admin/admin.php?page=revisionary-pro1,6992.1326.7825.74

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 10 options in the database
    • db_upgraded
    • rvy_wp_cron_usage_detected
    • rvy_scheduled_publish_cron
    • revisionary_wp_reviews_installed_on
    • revisionary_last_version
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
The smoke test was a success, however most plugin functionality was not tested

SRP 0% 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
Please take a closer look at the following
  • 2× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/revisionary/lib/vendor/publishpress/wordpress-version-notices/templates/menu-link/menu-link-script.php
    • > /wp-content/plugins/revisionary/lib/vendor/publishpress/wordpress-version-notices/templates/top-notice/notice.php
  • 49× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Interface 'PublishPress\\WordpressVersionNotices\\Module\\AdInterface' not found in wp-content/plugins/revisionary/lib/vendor/publishpress/wordpress-version-notices/src/Module/TopNotice/Module.php:37
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/revisionary/admin/admin-init_rvy.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_url_raw() in wp-content/plugins/revisionary/submittee_rvy.php:2
    • > 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/revisionary/admin/class-list-table-archive.php on line 2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_url_raw() in wp-content/plugins/revisionary/revisionary_main.php:2
    • > PHP Warning
      Class 'PublishPress\\WordpressVersionNotices\\Template\\TemplateInvalidArgumentsException' not found in wp-content/plugins/revisionary/lib/vendor/publishpress/wordpress-version-notices/src/deprecated.php on line 24
    • > PHP Notice
      Undefined variable: convertedUrlsMap in wp-content/plugins/revisionary/lib/vendor/publishpress/wordpress-version-notices/templates/menu-link/menu-link-script.php on line 3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_url_raw() in wp-content/plugins/revisionary/admin/edit-revision-classic-ui_rvy.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function rvy_get_manageable_types() in wp-content/plugins/revisionary/admin/revision-queue_rvy.php:8
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/revisionary/admin/class-list-table_rvy.php on line 2

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 Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
7 plugin tags: submit changes, revisions, scheduled changes, approve changes, duplicate page...

revisionary/revisionary.php Passed 13 tests

The main file in "PublishPress Revisions: Duplicate Posts, Submit, Approve and Schedule Content Changes" v. 3.5.4 serves as a complement to information provided in readme.txt and as the entry point to the plugin
121 characters long description:
Maintain published content with teamwork and precision using the Revisions model to submit, approve and schedule changes.

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Everything looks great! No dangerous files found in this plugin25,153 lines of code in 127 files:
LanguageFilesBlank linesComment linesLines of code
PHP1013,9522,60914,532
PO File73,1074,5457,934
JavaScript11261621,215
CSS4203531,000
JSON200436
YAML10025
XML13111

PHP code 50% from 2 tests

This plugin's cyclomatic complexity and code structure detailed below
The following items need your attention
  • Method cyclomatic complexity should be reduced to less than 100 (currently 171)
Cyclomatic complexity
Average complexity per logical line of code0.66
Average class complexity34.98
▷ Minimum class complexity1.00
▷ Maximum class complexity323.00
Average method complexity5.99
▷ Minimum method complexity1.00
▷ Maximum method complexity171.00
Code structure
Namespaces17
Interfaces6
Traits0
Classes58
▷ Abstract classes11.72%
▷ Concrete classes5798.28%
▷ Final classes23.51%
Methods434
▷ Static methods5913.59%
▷ Public methods36082.95%
▷ Protected methods194.38%
▷ Private methods5512.67%
Functions191
▷ Named functions15279.58%
▷ Anonymous functions3920.42%
Constants34
▷ Global constants2882.35%
▷ Class constants617.65%
▷ Public constants6100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
2 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
common/img/publishpress-logo-icon.png13.05KB4.10KB▼ 68.61%
common/img/publishpress-logo.png8.69KB8.91KB0.00%