84% preview-everywhere

Code Review | Preview Everywhere

WordPress plugin Preview Everywhere scored84%from 54 tests.

About plugin

  • Plugin page: preview-everywhere
  • Plugin version: 3.0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.9
  • WordPress version: 6.3.1
  • First release: May 7, 2016
  • Latest release: Nov 14, 2017
  • Number of updates: 8
  • Update frequency: every 74.1 days
  • Top authors: DanieleAlessandra (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /900 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Installer ran successfully

Server metrics [RAM: ▼0.86MB] [CPU: ▼22.71ms] Passed 4 tests

Server-side resources used by Preview Everywhere
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.81 ▼0.6516.28 ▼23.83
Dashboard /wp-admin3.23 ▼0.0744.27 ▼10.40
Posts /wp-admin/edit.php3.39 ▲0.0351.06 ▲1.00
Add New Post /wp-admin/post-new.php3.12 ▼2.7638.02 ▼57.62
Media Library /wp-admin/upload.php3.26 ▲0.0344.14 ▲10.27

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Preview Everywhere
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,816 ▲5514.68 ▲0.321.76 ▲0.1244.75 ▼1.20
Dashboard /wp-admin2,222 ▲455.55 ▼0.0285.65 ▼9.0239.87 ▼6.09
Posts /wp-admin/edit.php2,100 ▼31.97 ▼0.0339.41 ▲5.1038.03 ▲3.18
Add New Post /wp-admin/post-new.php1,528 ▼022.82 ▼0.24651.89 ▼44.6254.11 ▼0.96
Media Library /wp-admin/upload.php1,403 ▲34.25 ▼0.05107.27 ▼3.7945.26 ▲1.56

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments

Smoke tests 75% 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)
Good news, no errors were detected

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
Please fix the following
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/preview-everywhere/preview-everywhere.php:21

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 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
Please fix the following attributes:
  • Screenshots: Add images for these screenshots: #1 (The green Preview button in edit page.), #2 (Preview owner name near post title in list view.)
You can look at the official readme.txt

preview-everywhere/preview-everywhere.php Passed 13 tests

This is the main PHP file of "Preview Everywhere" version 3.0.2, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
62 characters long description:
Preview your content in whole site, not only as a Single Page.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Success! There were no dangerous files found in this plugin127 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP1017109
CSS10012
JavaScript1016

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity20.00
▷ Minimum class complexity20.00
▷ Maximum class complexity20.00
Average method complexity4.17
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods6
▷ Static methods00.00%
▷ Public methods6100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
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

Often times overlooked, PNG files can occupy unnecessary space in your plugin
2 PNG files occupy 0.39MB with 0.28MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot 1.png217.66KB58.49KB▼ 73.13%
screenshot 2.png178.75KB49.10KB▼ 72.53%