77% custom-image-sizes-by-99-robots

Code Review | Custom Image Sizes by 99 Robots

WordPress plugin Custom Image Sizes by 99 Robots scored77%from 54 tests.

About plugin

  • Plugin page: custom-image-size...
  • Plugin version: 1.2.10
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5-6.3.2
  • WordPress version: 6.3.1
  • First release: Nov 2, 2015
  • Latest release: Nov 1, 2023
  • Number of updates: 19
  • Update frequency: every 154.4 days
  • Top authors: 99robots (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

700+ active /7,716 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.04MB] [CPU: ▼6.78ms] Passed 4 tests

This is a short check of server-side resources used by Custom Image Sizes by 99 Robots
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0445.70 ▲4.94
Dashboard /wp-admin3.36 ▲0.0145.92 ▼17.05
Posts /wp-admin/edit.php3.47 ▲0.1150.05 ▼0.52
Add New Post /wp-admin/post-new.php5.94 ▲0.0582.41 ▼9.66
Media Library /wp-admin/upload.php3.28 ▲0.0536.74 ▲0.12
Custom Image Sizes /wp-admin/options-general.php?page=nnr-cis-settings-page3.3033.39

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Custom Image Sizes by 99 Robots
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲2214.04 ▼0.321.64 ▼0.2339.53 ▼3.03
Dashboard /wp-admin2,199 ▲255.61 ▲0.0793.49 ▼5.5141.76 ▼5.29
Posts /wp-admin/edit.php2,104 ▲42.03 ▲0.0633.63 ▼3.5433.91 ▼0.13
Add New Post /wp-admin/post-new.php1,541 ▲1323.42 ▲0.19664.60 ▼102.1272.38 ▲13.38
Media Library /wp-admin/upload.php1,407 ▲44.20 ▲0.0397.45 ▼11.7343.55 ▼3.79
Custom Image Sizes /wp-admin/options-general.php?page=nnr-cis-settings-page1,2602.4643.8677.84

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
  • Zombie WordPress options were found after uninstall: 6 options
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

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
  • 3× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Cannot access self:: when no class scope is active in wp-content/plugins/custom-image-sizes-by-99-robots/views/header.php:18
    • > PHP Fatal error
      Uncaught Error: Cannot access self:: when no class scope is active in wp-content/plugins/custom-image-sizes-by-99-robots/views/header.php:18
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/custom-image-sizes-by-99-robots/views/sidebar.php:23

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Please fix the following browser errors
    • > GET request to /wp-admin/options-general.php?page=nnr-cis-settings-page
    • > Network (severe)
    http://feeds.feedburner.com/99robots?format=sigpro - Failed to load resource: net::ERR_BLOCKED_BY_RESPONSE.NotSameSite

Optimizations

Plugin configuration 83% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
These attributes need to be fixed:
  • Donate link: Please fix this invalid url: ""
  • Contributors: The plugin contributors field is missing
The official readme.txt is a good inspiration

custom-image-sizes-by-99-robots/99robots-custom-image-sizes.php 77% from 13 tests

"Custom Image Sizes by 99 Robots" version 1.2.10's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please take the time to fix the following:
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug
  • Domain Path: The domain path folder does not exist ("/languages")
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("custom-image-sizes-by-99-robots.php" instead of "99robots-custom-image-sizes.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Everything looks great! No dangerous files found in this plugin1,571 lines of code in 12 files:
LanguageFilesBlank linesComment linesLines of code
PHP6111256680
SVG100640
CSS3466218
JavaScript2151333

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.25
Average class complexity32.00
▷ Minimum class complexity32.00
▷ Maximum class complexity32.00
Average method complexity2.82
▷ Minimum method complexity1.00
▷ Maximum method complexity20.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods17
▷ Static methods15.88%
▷ Public methods1588.24%
▷ Protected methods00.00%
▷ Private methods211.76%
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

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
5 PNG files occupy 0.23MB with 0.14MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
img/ad-plugin-request.png14.13KB5.42KB▼ 61.62%
assets/screenshot-2.png77.10KB22.98KB▼ 70.20%
img/logo.png2.74KB2.01KB▼ 26.60%
assets/screenshot-1.png123.97KB33.45KB▼ 73.02%
img/logo_v2.png22.30KB8.22KB▼ 63.13%