94% tilecrop

Code Review | TileCrop

WordPress plugin TileCrop scored 94% from 54 tests.

About plugin

  • Plugin page: tilecrop
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-3.5
  • WordPress version: 5.8.1
  • First release: Aug 28, 2013
  • Latest release: Aug 28, 2013
  • Number of updates: 13
  • Update frequency: every 73.0 days
  • Top authors: kasigi (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 627 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

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

Server-side resources used by TileCrop
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.84 ▲0.0136.26 ▼1.63
Dashboard /wp-admin3.06 ▲0.0154.77 ▲6.70
Posts /wp-admin/edit.php3.12 ▲0.0145.79 ▼0.85
Add New Post /wp-admin/post-new.php5.45 ▲0.0289.90 ▼562.00
Media Library /wp-admin/upload.php3.04 ▲0.0435.51 ▼2.72

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 4 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Checking browser requirements for TileCrop
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,679 ▲10715.88 ▲0.359.53 ▼1.1150.18 ▼3.44
Dashboard /wp-admin2,969 ▲326.05 ▲0.13158.81 ▲5.46113.82 ▲3.91
Posts /wp-admin/edit.php2,739 ▼02.71 ▼0.0164.90 ▼3.9087.05 ▼5.56
Add New Post /wp-admin/post-new.php1,615 ▲11521.39 ▲2.93293.13 ▼94.17100.56 ▼10.78
Media Library /wp-admin/upload.php1,807 ▼35.04 ▲0.02161.52 ▲9.36116.41 ▲3.92

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Uninstaller ran successfully

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 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following
  • 3× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Image_Editor_Imagick' not found in wp-content/plugins/tilecrop/editors/tilecropIM.php:17
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Image_Editor_GD' not found in wp-content/plugins/tilecrop/editors/tilecropGD.php:17
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/tilecrop/tilecrop.php:24

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
1 plugin tags: image

tilecrop/tilecrop.php Passed 13 tests

The main PHP file in "TileCrop" ver. 1.0.0 adds more information about the plugin and also serves as the entry point for this plugin
136 characters long description:
Enables images to be cropped to a specific aspect ratio w/o losing any image data. It ALSO enables upscaling of any tilecropped images.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
No dangerous file extensions were detected153 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP37775153

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.23
Average class complexity10.50
▷ Minimum class complexity7.00
▷ Maximum class complexity14.00
Average method complexity10.50
▷ Minimum method complexity7.00
▷ Maximum method complexity14.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods2
▷ Static methods00.00%
▷ Public methods150.00%
▷ Protected methods150.00%
▷ Private methods00.00%
Functions2
▷ Named functions2100.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
PNG images were not found in this plugin