83% xpressium-image-limit

Code Review | xpressium Image Limit

WordPress plugin xpressium Image Limit scored 83% from 54 tests.

About plugin

  • Plugin page: xpressium-image-l...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0.0-4.0
  • WordPress version: 6.3.1
  • First release: May 8, 2017
  • Latest release: May 8, 2017
  • Number of updates: 4
  • Update frequency: N/A
  • Top authors: jcastroa87 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 650 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
Installer ran successfully

Server metrics [RAM: ▲0.03MB] [CPU: ▼2.18ms] Passed 4 tests

This is a short check of server-side resources used by xpressium Image Limit
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0338.59 ▼4.69
Dashboard /wp-admin3.33 ▲0.0343.67 ▼10.02
Posts /wp-admin/edit.php3.38 ▲0.0349.02 ▲3.07
Add New Post /wp-admin/post-new.php5.91 ▲0.0392.86 ▲2.92
Media Library /wp-admin/upload.php3.26 ▲0.0336.65 ▲5.10

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 6 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
theysaidso_admin_options
db_upgraded
widget_recent-comments
widget_theysaidso_widget
widget_recent-posts

Browser metrics Passed 4 tests

This is an overview of browser requirements for xpressium Image Limit
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.19 ▼1.011.70 ▼0.5239.42 ▼7.75
Dashboard /wp-admin2,206 ▲154.86 ▼1.02108.32 ▼9.2141.05 ▼3.30
Posts /wp-admin/edit.php2,089 ▼01.97 ▼0.0241.47 ▲5.6337.45 ▲4.23
Add New Post /wp-admin/post-new.php1,535 ▲223.34 ▲0.32619.18 ▲3.8348.64 ▼2.31
Media Library /wp-admin/upload.php1,388 ▼34.29 ▲0.0696.58 ▼11.6643.08 ▼2.55

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts

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 everything seems fine, this is not 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
  • 2× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/xpressium-image-limit/xp-image-limit-options.php:35
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/xpressium-image-limit/xp-image-limit-options.php:35

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser errors were detected

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 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
3 plugin tags: media, images, uploads

xpressium-image-limit/xp-image-limit.php 77% from 13 tests

"xpressium Image Limit" version 1.0.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please make the necessary changes and fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("xpressium-image-limit.php" instead of "xp-image-limit.php")
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6
  • Domain Path: The domain path points to a folder that does not exist ("/languages/")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
No dangerous file extensions were detected143 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP33846143

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.15
Average class complexity6.00
▷ Minimum class complexity6.00
▷ Maximum class complexity6.00
Average method complexity1.71
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods7
▷ Static methods00.00%
▷ Public methods7100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions7
▷ Named functions7100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
2 PNG files occupy 0.55MB with 0.33MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-2.png275.63KB116.41KB▼ 57.76%
screenshot-1.png292.56KB117.57KB▼ 59.81%