84% explicit-width-and-height

Code Review | Explicit Width and Height

WordPress plugin Explicit Width and Height scored84%from 54 tests.

About plugin

  • Plugin page: explicit-width-an...
  • Plugin version: 1.0.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.3-6.1.1
  • WordPress version: 6.3.1
  • First release: Feb 11, 2023
  • Latest release: Feb 11, 2023
  • Number of updates: 4
  • Update frequency: N/A
  • Top authors: philsafc (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /366 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
Install script ran successfully

Server metrics [RAM: ▼0.33MB] [CPU: ▼23.50ms] Passed 4 tests

Server-side resources used by Explicit Width and Height
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0138.58 ▼9.53
Dashboard /wp-admin3.31 ▼0.0349.42 ▼23.70
Posts /wp-admin/edit.php3.36 ▲0.0154.86 ▲1.77
Add New Post /wp-admin/post-new.php4.60 ▼1.2843.97 ▼60.89
Media Library /wp-admin/upload.php3.23 ▲0.0140.28 ▲0.13

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

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

Browser metrics Passed 4 tests

Explicit Width and Height: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.34 ▲0.141.62 ▼0.1042.65 ▼0.13
Dashboard /wp-admin2,192 ▲185.54 ▼0.0382.80 ▼17.6439.27 ▼4.79
Posts /wp-admin/edit.php2,100 ▼01.99 ▲0.0235.47 ▼2.7134.75 ▼0.29
Add New Post /wp-admin/post-new.php1,526 ▼223.37 ▲0.04603.48 ▼56.9944.38 ▼7.22
Media Library /wp-admin/upload.php1,400 ▼04.19 ▼0.0696.29 ▼12.4641.83 ▼7.73

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • The uninstall procedure has failed, leaving 6 options in the database
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Everything seems fine, however 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
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/explicit-width-and-height/explicit-width-and-height.php:39

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 97% from 29 tests

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
Attributes that need to be fixed:
  • License uri: Please fix this invalid url: "[http://www.gnu.org/licenses/gpl-2.0.html](http://www.gnu.org/licenses/gpl-2.0.html)"
Please take inspiration from this readme.txt

explicit-width-and-height/explicit-width-and-height.php Passed 13 tests

The primary PHP file in "Explicit Width and Height" version 1.0.0 is used by WordPress to initiate all plugin functionality
66 characters long description:
Set explicit width and height for all images on site automatically

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
There were no executable files found in this plugin21 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP181021

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.36
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%
Functions1
▷ Named functions1100.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