72% super-public-post-preview

Code Review | Super Public Post Preview

WordPress plugin Super Public Post Preview scored72%from 54 tests.

About plugin

  • Plugin page: super-public-post...
  • Plugin version: 1.0.8
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-5.0
  • WordPress version: 6.3.1
  • First release: Jul 24, 2017
  • Latest release: Dec 23, 2018
  • Number of updates: 23
  • Update frequency: every 22.5 days
  • Top authors: invelity (69.57%)mankeee (34.78%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /715 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
The plugin installed successfully, without throwing any errors or notices

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

Server-side resources used by Super Public Post Preview
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0139.56 ▲3.03
Dashboard /wp-admin3.33 ▲0.0346.45 ▼0.62
Posts /wp-admin/edit.php3.38 ▲0.0346.86 ▲2.92
Add New Post /wp-admin/post-new.php5.91 ▲0.0392.73 ▲4.79
Media Library /wp-admin/upload.php3.26 ▲0.0332.62 ▼2.04

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 21 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
db_upgraded
widget_theysaidso_widget
widget_recent-posts
widget_recent-comments
theysaidso_admin_options

Browser metrics Passed 4 tests

Checking browser requirements for Super Public Post Preview
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,844 ▲9813.40 ▼1.192.03 ▲0.3144.49 ▼1.37
Dashboard /wp-admin2,222 ▲345.91 ▲1.01101.41 ▼6.7638.78 ▼1.53
Posts /wp-admin/edit.php2,108 ▲192.08 ▲0.0435.33 ▼1.4033.56 ▼2.46
Add New Post /wp-admin/post-new.php1,533 ▼021.19 ▼1.97603.10 ▼73.3772.30 ▲24.05
Media Library /wp-admin/upload.php1,407 ▲194.30 ▲0.1197.82 ▼16.2742.38 ▼7.19
Super Preview Post /wp-admin/super_preview_post.php260.440.0712.73

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Please fix the following items
  • The uninstall procedure has failed, leaving 6 options in the database
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts

Smoke tests 25% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
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
The following issues need your attention
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/super-public-post-preview/super_public_post_preview.php
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/super-public-post-preview/premium.php:3

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Please take a look at the following user-side issues
    • > GET request to /wp-admin/super_preview_post.php
    • > Network (severe)
    wp-admin/super_preview_post.php - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 93% 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
These attributes need your attention:
  • Donate link: Invalid URI ("")
You can take inspiration from this readme.txt

super-public-post-preview/super_public_post_preview.php 92% from 13 tests

This is the main PHP file of "Super Public Post Preview" version 1.0.8, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please take the time to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("super-public-post-preview.php" instead of "super_public_post_preview.php")

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
There were no executable files found in this plugin286 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP25010251
PO File1111832
CSS33113

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.41
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions15
▷ Named functions1493.33%
▷ Anonymous functions16.67%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
9 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/css/images/ui-bg_diagonals-thick_75_f3d8d8_40x40.png0.40KB0.15KB▼ 61.99%
assets/css/images/ui-bg_highlight-soft_15_cc0000_1x100.png0.31KB0.18KB▼ 43.48%
assets/css/images/ui-icons_cc0000_256x240.png4.44KB4.17KB▼ 6.02%
assets/css/images/ui-bg_dots-small_65_a6a6a6_2x2.png0.20KB0.08KB▼ 57.97%
assets/css/images/ui-icons_ffffff_256x240.png6.15KB4.17KB▼ 32.13%