10% better-images-crop

Code Review | Better Images Crop

WordPress plugin Better Images Crop scored10%from 54 tests.

About plugin

  • Plugin page: better-images-crop
  • Plugin version: 1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-3.8
  • WordPress version: 6.3.1
  • First release: Feb 14, 2014
  • Latest release: Feb 14, 2014
  • Number of updates: 5
  • Update frequency: every 0.2 days
  • Top authors: wididwi (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /5,941 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
You still need to fix the following installer errors
  • The plugin did not install without errors
    • > User deprecated in wp-includes/functions.php+5463
    Function is_plugin_page is deprecated since version 3.1.0 with no alternative available.

Server metrics [RAM: ▼1.91MB] [CPU: ▼52.05ms] Passed 4 tests

Server-side resources used by Better Images Crop
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.09 ▼1.384.63 ▼36.37
Dashboard /wp-admin2.11 ▼1.205.77 ▼49.32
Posts /wp-admin/edit.php2.11 ▼1.255.49 ▼39.51
Add New Post /wp-admin/post-new.php2.11 ▼3.786.42 ▼83.00
Media Library /wp-admin/upload.php2.11 ▼1.135.72 ▼28.72
Better Image Crop /wp-admin/options-general.php?page=better-images-crop/better-images-crop.php2.115.93

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 8 new files
Database: no new tables, 7 new options
New WordPress options
theysaidso_admin_options
db_upgraded
wd_bic_options
widget_theysaidso_widget
widget_recent-posts
widget_recent-comments
can_compress_scripts

Browser metrics Passed 4 tests

A check of browser resources used by Better Images Crop
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,829 ▲8314.43 ▲0.061.94 ▼0.2641.62 ▼2.67
Dashboard /wp-admin2,207 ▲195.78 ▲0.8997.49 ▼11.4340.47 ▼8.90
Posts /wp-admin/edit.php2,093 ▲42.04 ▼0.1239.70 ▲3.3336.60 ▲1.05
Add New Post /wp-admin/post-new.php1,531 ▲1123.42 ▲0.35681.52 ▼0.3951.02 ▼2.46
Media Library /wp-admin/upload.php1,389 ▲44.22 ▲0.01107.91 ▲5.4548.00 ▲4.19
Better Image Crop /wp-admin/options-general.php?page=better-images-crop/better-images-crop.php9552.2029.5144.40

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • Uninstall procedure had uncaught errors
    • > User deprecated in wp-includes/functions.php+5463
    Function is_plugin_page is deprecated since version 3.1.0 with no alternative available.
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • wd_bic_options
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Smoke test failed, please fix the following
    • > GET request to /wp-admin/options-general.php?page=better-images-crop/better-images-crop.php
    • > User deprecated in wp-includes/functions.php+5463
    Function is_plugin_page is deprecated since version 3.1.0 with no alternative available.
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=better-images-crop/better-images-crop.php
    • > User deprecated in wp-includes/functions.php+5737
    Function has_cap was called with an argument that is deprecated since version 2.0.0! Usage of user levels is deprecated. Use capabilities instead.
    • > GET request to /wp-admin/options-general.php?page=better-images-crop/better-images-crop.php
    • > User deprecated in wp-includes/functions.php+5747
    Function add_option was called with an argument that is deprecated since version 2.3.0 with no alternative available.

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_plugin_page() in wp-content/plugins/better-images-crop/better-images-crop.php:15

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Attributes that require attention:
  • Plugin Name: Write the name of your plugin instead of "Plugin Name" on the first line ( === better-images-crop === )
The official readme.txt is a good inspiration

better-images-crop/better-images-crop.php Passed 13 tests

"Better Images Crop" version 1.2's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
66 characters long description:
this simple plugin help theme developers to create their thumbnail

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
There were no executable files found in this plugin211 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP14217211

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.30
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%
Functions4
▷ Named functions4100.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
6 PNG files occupy 0.04MB with 0.02MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/images-position-5.png7.09KB3.33KB▼ 53.06%
images/images-position-1.png8.01KB3.72KB▼ 53.49%
images/images-position-4.png6.93KB3.26KB▼ 52.92%
images/images-position-3.png7.59KB3.53KB▼ 53.56%
images/images-position-6.png7.08KB3.49KB▼ 50.65%