84% wr-allow-modern-images

Code Review | WR Allow modern images

WordPress plugin WR Allow modern images scored 84% from 54 tests.

About plugin

  • Plugin page: wr-allow-modern-i...
  • Plugin version: 1.0.1
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-6.2
  • WordPress version: 6.3.1
  • First release: Mar 10, 2023
  • Latest release: Apr 5, 2023
  • Number of updates: 4
  • Update frequency: every 6.7 days
  • Top authors: RazielKanos (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 250 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed gracefully, with no errors

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

Server-side resources used by WR Allow modern images
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0137.21 ▼3.82
Dashboard /wp-admin3.31 ▲0.0144.32 ▼2.51
Posts /wp-admin/edit.php3.36 ▲0.0046.11 ▲0.95
Add New Post /wp-admin/post-new.php5.89 ▲0.0182.96 ▼10.34
Media Library /wp-admin/upload.php3.23 ▲0.0034.44 ▼5.52

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
theysaidso_admin_options
widget_recent-posts
widget_recent-comments
widget_theysaidso_widget
db_upgraded

Browser metrics Passed 4 tests

WR Allow modern images: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.76 ▼0.631.66 ▼0.3240.60 ▼1.16
Dashboard /wp-admin2,206 ▲215.91 ▲0.0295.95 ▼4.9637.64 ▼8.40
Posts /wp-admin/edit.php2,089 ▼02.04 ▲0.0435.79 ▼2.6932.13 ▼2.41
Add New Post /wp-admin/post-new.php1,533 ▲1323.39 ▲0.18659.60 ▼50.8259.16 ▲2.17
Media Library /wp-admin/upload.php1,382 ▼64.21 ▲0.1299.37 ▼22.5644.20 ▼4.79

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • This plugin does not fully uninstall, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded

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
Good news, no errors were detected

SRP 50% 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
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/wr-allow-modern-images/allow-modern-images.php:22

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
2 plugin tags: mime_types, admin

wr-allow-modern-images/allow-modern-images.php 92% from 13 tests

"WR Allow modern images" version 1.0.1's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
You should first fix the following items:
  • Main file name: Name the main plugin file the same as the plugin slug ("wr-allow-modern-images.php" instead of "allow-modern-images.php")

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 plugin11 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP111011

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.00
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

All PNG images should be compressed to minimize bandwidth usage for end users
There were not PNG files found in your plugin