77% preview-posts-everywhere

Code Review | Preview Posts Everywhere

WordPress plugin Preview Posts Everywhere scored77%from 54 tests.

About plugin

  • Plugin page: preview-posts-eve...
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5.1-4.0
  • WordPress version: 6.3.1
  • First release: Oct 15, 2013
  • Latest release: Sep 5, 2014
  • Number of updates: 6
  • Update frequency: every 54.2 days
  • Top authors: Pawel Wawrzyniak (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

30+ active /1,753 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
The plugin installed gracefully, with no errors

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

Analyzing server-side resources used by Preview Posts Everywhere
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0239.64 ▲2.17
Dashboard /wp-admin3.33 ▼0.0245.20 ▼18.57
Posts /wp-admin/edit.php3.38 ▲0.0242.32 ▼5.59
Add New Post /wp-admin/post-new.php5.91 ▲0.0278.07 ▼21.55
Media Library /wp-admin/upload.php3.25 ▲0.0235.23 ▲4.71
Preview Posts Everywhere /wp-admin/options-general.php?page=wpsam-ppe3.2428.99

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 13 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-comments
widget_recent-posts
theysaidso_admin_options
db_upgraded
widget_theysaidso_widget
wpsam_ppe_settings
can_compress_scripts

Browser metrics Passed 4 tests

An overview of browser requirements for Preview Posts Everywhere
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲3214.27 ▼0.001.64 ▼0.0544.15 ▼1.57
Dashboard /wp-admin2,202 ▲255.63 ▲0.1093.74 ▲6.7242.11 ▲4.57
Posts /wp-admin/edit.php2,104 ▲41.95 ▼0.0136.87 ▼5.2733.79 ▼3.55
Add New Post /wp-admin/post-new.php1,529 ▼023.56 ▲0.45671.36 ▲68.4751.32 ▼16.53
Media Library /wp-admin/upload.php1,407 ▲104.22 ▲0.0595.99 ▼4.7945.57 ▼0.16
Preview Posts Everywhere /wp-admin/options-general.php?page=wpsam-ppe8501.9922.1229.89

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
  • The uninstall procedure has failed, leaving 7 options in the database
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options
    • wpsam_ppe_settings

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Smoke test failed, please fix the following
    • > GET request to /wp-admin/options-general.php?page=wpsam-ppe
    • > User deprecated in wp-includes/functions.php+5463
    Function screen_icon is deprecated since version 3.8.0 with no alternative available.
    • > GET request to /wp-admin/options-general.php?page=wpsam-ppe
    • > User deprecated in wp-includes/functions.php+5463
    Function get_screen_icon is deprecated since version 3.8.0 with no alternative available.

SRP 50% from 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
The following issues need your attention
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function screen_icon() in wp-content/plugins/preview-posts-everywhere/views/admin.php:17

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Please fix the following attributes:
  • Plugin Name: "Plugin Name" should be replaced with the name of your plugin on the first line ( === preview-posts-everywhere === )
  • Screenshots: Screenshot #1 (Settings page) image not found
You can take inspiration from this readme.txt

preview-posts-everywhere/wpsam-ppe.php 85% from 13 tests

The entry point to "Preview Posts Everywhere" 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:
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug
  • Main file name: Name the main plugin file the same as the plugin slug ("preview-posts-everywhere.php" instead of "wpsam-ppe.php")

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
Good job! No executable or dangerous file extensions detected250 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP6135216207
PO File1101043

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.26
Average class complexity8.50
▷ Minimum class complexity7.00
▷ Maximum class complexity10.00
Average method complexity2.00
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods15
▷ Static methods320.00%
▷ Public methods1386.67%
▷ Protected methods00.00%
▷ Private methods213.33%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants00.00%
▷ Class constants2100.00%
▷ Public constants2100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
1 PNG file occupies 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png25.55KB13.82KB▼ 45.91%