83% wp-proportion-image-maker

Code Review | WP Proportion Image Maker

WordPress plugin WP Proportion Image Maker scored83%from 54 tests.

About plugin

  • Plugin page: wp-proportion-ima...
  • Plugin version: 1.0.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-4.7
  • WordPress version: 6.3.1
  • First release: Apr 27, 2017
  • Latest release: Apr 27, 2017
  • Number of updates: 8
  • Update frequency: N/A
  • Top authors: luganos (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /721 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.08MB] [CPU: ▲1.81ms] Passed 4 tests

This is a short check of server-side resources used by WP Proportion Image Maker
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0137.93 ▼4.86
Dashboard /wp-admin3.42 ▲0.1155.45 ▲5.15
Posts /wp-admin/edit.php3.53 ▲0.1754.02 ▲7.28
Add New Post /wp-admin/post-new.php5.97 ▲0.0996.85 ▲4.52
Media Library /wp-admin/upload.php3.32 ▲0.0938.45 ▲2.44
Create proportion image /wp-admin/upload.php?page=setting_for_proportion3.3239.16

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 16 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-comments
widget_recent-posts
db_upgraded
theysaidso_admin_options
widget_theysaidso_widget

Browser metrics Passed 4 tests

An overview of browser requirements for WP Proportion Image Maker
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,963 ▲20214.87 ▲0.491.70 ▼0.1945.69 ▼0.97
Dashboard /wp-admin2,369 ▲1666.69 ▲0.79133.13 ▲16.3539.95 ▼5.70
Posts /wp-admin/edit.php2,271 ▲1713.69 ▲1.7048.32 ▲9.1433.77 ▼5.37
Add New Post /wp-admin/post-new.php1,536 ▼1023.33 ▲0.26665.78 ▲10.1835.76 ▼26.65
Media Library /wp-admin/upload.php1,414 ▲174.48 ▲0.1986.84 ▼23.2446.89 ▼0.39
Create proportion image /wp-admin/upload.php?page=setting_for_proportion1,1923.2447.1482.52

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments

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
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-proportion-image-maker/includes/admin/settings.php:504

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 79% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Attributes that need to be fixed:
  • Contributors: No tags were detected
  • Contributors: Contributors not specified
Please take inspiration from this readme.txt

wp-proportion-image-maker/wp-proportion.php 69% from 13 tests

"WP Proportion Image Maker" version 1.0.0.0'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:
  • Domain Path: Note that the domain path follows the same naming rules as the domain name, using only dashes and lowercase characters ("languages")
  • Domain Path: Please prefix the domain path with a forward slash character ("/languages")
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("wp-proportion-image-maker.php" instead of "wp-proportion.php")
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug

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
Success! There were no dangerous files found in this plugin4,668 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript21,1521,0344,127
PHP3164344420
CSS113071
PO File1182050

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.20
Average class complexity13.33
▷ Minimum class complexity4.00
▷ Maximum class complexity29.00
Average method complexity2.09
▷ Minimum method complexity1.00
▷ Maximum method complexity17.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods33
▷ Static methods39.09%
▷ Public methods2575.76%
▷ Protected methods00.00%
▷ Private methods824.24%
Functions4
▷ Named functions375.00%
▷ Anonymous functions125.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
2 PNG files occupy 0.13MB with 0.09MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
includes/admin/images/scale.png0.95KB0.21KB▼ 77.61%
includes/admin/images/product.png136.43KB50.10KB▼ 63.28%