10% page-post-revisions-and-public-preview

Code Review | Page/Post Revisions Manager and Public Preview

WordPress plugin Page/Post Revisions Manager and Public Preview scored10%from 54 tests.

About plugin

  • Plugin page: page-post-revisio...
  • Plugin version: 1.0.1
  • PHP compatiblity: 5.3.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-6.3
  • WordPress version: 6.3.1
  • First release: Oct 28, 2022
  • Latest release: Aug 9, 2023
  • Number of updates: 11
  • Update frequency: every 26.1 days
  • Top authors: prashantbhivsane (63.64%)mintukumar0111 (45.45%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /684 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
It is recommended to fix the following installer errors
  • Install procedure validation failed for this plugin
    • > User notice in wp-includes/functions.php+5905
    Function wpdb::prepare was called incorrectly. The query argument of wpdb::prepare() must have a placeholder. Please see Debugging in WordPress for more information. (This message was added in version 3.9.0.)

Server metrics [RAM: ▲0.02MB] [CPU: ▼3.80ms] Passed 4 tests

This is a short check of server-side resources used by Page/Post Revisions Manager and Public Preview
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0241.20 ▲2.60
Dashboard /wp-admin3.33 ▲0.0250.58 ▼2.32
Posts /wp-admin/edit.php3.38 ▲0.0249.35 ▼5.04
Add New Post /wp-admin/post-new.php5.93 ▲0.0488.09 ▼10.42
Media Library /wp-admin/upload.php3.25 ▲0.0242.70 ▲3.49
Help /wp-admin/admin.php?page=mo_revision_help3.2434.15
Dashboard /wp-admin/admin.php?page=mo_revision_manager3.1929.49

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 37 new files
Database: 1 new table, 6 new options
New tables
wp_mor_data
New WordPress options
widget_theysaidso_widget
theysaidso_admin_options
can_compress_scripts
db_upgraded
widget_recent-posts
widget_recent-comments

Browser metrics Passed 4 tests

This is an overview of browser requirements for Page/Post Revisions Manager and Public Preview
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,922 ▲17613.84 ▼0.545.82 ▲3.7443.73 ▼0.02
Dashboard /wp-admin2,230 ▲425.43 ▼0.46120.11 ▲7.3479.29 ▲36.37
Posts /wp-admin/edit.php2,131 ▲422.38 ▲0.3645.14 ▲2.6436.29 ▼4.11
Add New Post /wp-admin/post-new.php1,702 ▲16022.47 ▲4.07731.47 ▲113.4336.96 ▼15.68
Media Library /wp-admin/upload.php1,424 ▲334.50 ▲0.30113.44 ▲14.7565.71 ▲24.13
Help /wp-admin/admin.php?page=mo_revision_help8851.8935.3234.65
Dashboard /wp-admin/admin.php?page=mo_revision_manager9902.5955.5341.08

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
  • Uninstall procedure validation failed for this plugin
    • > User notice in wp-includes/functions.php+5905
    Function wpdb::prepare was called incorrectly. The query argument of wpdb::prepare() must have a placeholder. Please see Debugging in WordPress for more information. (This message was added in version 3.9.0.)
  • This plugin does not fully uninstall, leaving 6 options in the database
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
These server-side errors were triggered
    • > GET request to /wp-admin/admin.php?page=mo_revision_manager
    • > User notice in wp-includes/functions.php+5905
    Function wpdb::prepare was called incorrectly. The query argument of wpdb::prepare() must have a placeholder. Please see Debugging in WordPress for more information. (This message was added in version 3.9.0.)

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
Please fix the following items
  • 3× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/page-post-revisions-and-public-preview/admin/partials/mo-revisions-help.php
    • > /wp-content/plugins/page-post-revisions-and-public-preview/admin/partials/mo-revisions-admin-display.php
    • > /wp-content/plugins/page-post-revisions-and-public-preview/public/partials/mo-revisions-public-display.php
  • 3× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Notice
      Undefined variable: post_result in wp-content/plugins/page-post-revisions-and-public-preview/admin/partials/mo-revisions-admin-display.php on line 33
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/page-post-revisions-and-public-preview/admin/partials/mo-revisions-admin-show-diff.php:10
    • > PHP Warning
      Invalid argument supplied for foreach() in wp-content/plugins/page-post-revisions-and-public-preview/admin/partials/mo-revisions-admin-display.php on line 33

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Please fix the following attributes:
  • Tags: Please reduce the number of tags, currently 12 tag instead of maximum 10
You can take inspiration from this readme.txt

page-post-revisions-and-public-preview/mo-revisions.php 77% from 13 tests

The entry point to "Page/Post Revisions Manager and Public Preview" version 1.0.1 is a PHP file that has certain tags in its header comment area
Please make the necessary changes and fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("page-post-revisions-and-public-preview.php" instead of "mo-revisions.php")
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 338 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Good job! No executable or dangerous file extensions detected1,164 lines of code in 30 files:
LanguageFilesBlank linesComment linesLines of code
PHP16265518797
JavaScript42011221
CSS5275141
SVG5005

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.15
Average class complexity3.78
▷ Minimum class complexity1.00
▷ Maximum class complexity22.00
Average method complexity1.68
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes9
▷ Abstract classes00.00%
▷ Concrete classes9100.00%
▷ Final classes00.00%
Methods37
▷ Static methods25.41%
▷ Public methods3081.08%
▷ Protected methods00.00%
▷ Private methods718.92%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
admin/images/miniorange_icon.png0.44KB0.35KB▼ 18.61%