90% public-post-preview

Code Review | Public Post Preview

WordPress plugin Public Post Preview scored 90% from 54 tests.

About plugin

  • Plugin page: public-post-preview
  • Plugin version: 2.10.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.1
  • WordPress version: 6.3.1
  • First release: Feb 20, 2009
  • Latest release: Nov 19, 2022
  • Number of updates: 103
  • Update frequency: every 48.8 days
  • Top authors: ocean90 (83.5%)sivel (17.48%)

Code review

54 tests

User reviews

71 reviews

Install metrics

100,000+ active / 960,283 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.01MB] [CPU: ▲1.46ms] Passed 4 tests

Server-side resources used by Public Post Preview
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0141.54 ▲0.41
Dashboard /wp-admin3.31 ▲0.0162.29 ▲8.08
Posts /wp-admin/edit.php3.37 ▲0.0159.95 ▲2.19
Add New Post /wp-admin/post-new.php5.92 ▲0.03103.00 ▼1.90
Media Library /wp-admin/upload.php3.24 ▲0.0142.23 ▲5.14

Server storage [IO: ▲0.05MB] [DB: ▲0.07MB] Passed 3 tests

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 9 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-comments
widget_recent-posts
widget_theysaidso_widget
theysaidso_admin_options
db_upgraded

Browser metrics Passed 4 tests

An overview of browser requirements for Public Post Preview
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▼2513.30 ▼1.101.77 ▼0.7846.82 ▼5.03
Dashboard /wp-admin2,203 ▼34.87 ▼0.02103.98 ▼7.2441.36 ▲3.95
Posts /wp-admin/edit.php2,092 ▲32.04 ▲0.0741.69 ▼0.8034.42 ▼0.15
Add New Post /wp-admin/post-new.php1,535 ▲1523.32 ▲0.01660.73 ▲11.0766.25 ▲15.22
Media Library /wp-admin/upload.php1,385 ▼04.24 ▼0.01120.58 ▲13.6845.76 ▼0.09

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Congratulations! This plugin passed the SRP test

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Attributes that require attention: The official readme.txt might help

public-post-preview/public-post-preview.php Passed 13 tests

The main file in "Public Post Preview" v. 2.10.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
63 characters long description:
Allow anonymous users to preview a post before it is published.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Success! There were no dangerous files found in this plugin669 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP2102275353
JavaScript53844248
Markdown121068

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.44
Average class complexity64.00
▷ Minimum class complexity64.00
▷ Maximum class complexity64.00
Average method complexity3.33
▷ Minimum method complexity1.00
▷ Maximum method complexity15.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods27
▷ Static methods27100.00%
▷ Public methods1659.26%
▷ Protected methods00.00%
▷ Private methods1140.74%
Functions0
▷ Named functions00.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
There are no PNG files in this plugin