84% responsive-post-preview

Code Review | Responsive Post Preview

WordPress plugin Responsive Post Preview scored84%from 54 tests.

About plugin

  • Plugin page: responsive-post-p...
  • Plugin version: 1.0.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-4.3.1
  • WordPress version: 6.3.1
  • First release: Feb 4, 2014
  • Latest release: Nov 5, 2015
  • Number of updates: 12
  • Update frequency: every 53.5 days
  • Top authors: jakebresnehan (100%)

Code review

54 tests

User reviews

1 review

Install metrics

600+ active /11,602 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.00MB] [CPU: ▼5.66ms] Passed 4 tests

Server-side resources used by Responsive Post Preview
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0140.66 ▼0.55
Dashboard /wp-admin3.31 ▼0.0352.97 ▼10.47
Posts /wp-admin/edit.php3.37 ▲0.0153.40 ▼2.55
Add New Post /wp-admin/post-new.php5.90 ▲0.0195.98 ▼9.08
Media Library /wp-admin/upload.php3.24 ▲0.0137.20 ▼0.24

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 9 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-posts
widget_theysaidso_widget
widget_recent-comments
theysaidso_admin_options
db_upgraded

Browser metrics Passed 4 tests

A check of browser resources used by Responsive Post Preview
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.29 ▼1.012.16 ▲0.4145.98 ▼0.78
Dashboard /wp-admin2,209 ▲185.88 ▲0.99106.25 ▼2.5743.43 ▲4.59
Posts /wp-admin/edit.php2,089 ▼01.97 ▼0.0741.76 ▲6.4041.82 ▲4.70
Add New Post /wp-admin/post-new.php1,533 ▲523.22 ▲4.87689.13 ▲53.7366.90 ▲12.41
Media Library /wp-admin/upload.php1,391 ▲34.21 ▲0.03108.27 ▲7.5346.85 ▲5.60

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 50% 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
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/responsive-post-preview/responsive-post-preview.php:16

User-side errors Passed 1 test

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

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
2 plugin tags: post, edit

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

The principal PHP file in "Responsive Post Preview" v. 1.0.3 is loaded by WordPress automatically on each request
66 characters long description:
Adds the ability to preview your posts at different viewport sizes

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
No dangerous file extensions were detected141 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP1461963
JavaScript1261338
CSS14030
SVG10110

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.17
Average class complexity3.00
▷ Minimum class complexity3.00
▷ Maximum class complexity3.00
Average method complexity1.50
▷ Minimum method complexity1.00
▷ Maximum method complexity2.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.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

All PNG images should be compressed to minimize bandwidth usage for end users
2 PNG files occupy 0.04MB with 0.02MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
img/sprites.png0.55KB0.27KB▼ 51.15%
assets/screenshot-1.png41.60KB14.00KB▼ 66.35%