84% post-script-responsive-images

Code Review | Post Script Responsive Images

WordPress plugin Post Script Responsive Images scored84%from 54 tests.

About plugin

  • Plugin page: post-script-respo...
  • Plugin version: 2.1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.7.1
  • WordPress version: 6.3.1
  • First release: Feb 20, 2015
  • Latest release: Jan 6, 2017
  • Number of updates: 36
  • Update frequency: every 19.1 days
  • Top authors: SilverOkami42 (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

70+ active /4,760 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 gracefully, with no errors

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

An overview of server-side resources used by Post Script Responsive Images
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0338.27 ▲1.20
Dashboard /wp-admin3.33 ▼0.0144.03 ▼15.43
Posts /wp-admin/edit.php3.38 ▲0.0346.54 ▼1.78
Add New Post /wp-admin/post-new.php5.91 ▲0.0389.59 ▼7.06
Media Library /wp-admin/upload.php3.25 ▲0.0333.84 ▼1.71

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Post Script Responsive Images
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲2913.30 ▼1.084.07 ▲2.0943.48 ▲0.57
Dashboard /wp-admin2,206 ▲214.83 ▼0.01110.18 ▲4.2040.81 ▼4.69
Posts /wp-admin/edit.php2,089 ▼02.01 ▼0.0138.96 ▼0.6035.16 ▲0.73
Add New Post /wp-admin/post-new.php1,528 ▼523.28 ▲0.08667.79 ▼5.3048.60 ▼13.28
Media Library /wp-admin/upload.php1,391 ▼04.25 ▼0.0595.84 ▼2.6542.45 ▼2.98

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
  • This plugin did not uninstall successfully, 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 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting 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
Almost there! Just fix the following items
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/post-script-responsive-images/post-script-responsive.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
6 plugin tags: post script, srcset, responsive images, responsive, images...

post-script-responsive-images/post-script-responsive.php 92% from 13 tests

The principal PHP file in "Post Script Responsive Images" v. 2.1.0 is loaded by WordPress automatically on each request
It is important to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("post-script-responsive-images.php" instead of "post-script-responsive.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Good job! No executable or dangerous file extensions detected128 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP22318128

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity29.00
▷ Minimum class complexity29.00
▷ Maximum class complexity29.00
Average method complexity8.00
▷ Minimum method complexity3.00
▷ Maximum method complexity14.00
Code structure
Namespaces1
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

PNG files should be compressed to save space and minimize bandwidth usage
PNG images were not found in this plugin