74% ewz-rating

Code Review | EWZ-Rating

WordPress plugin EWZ-Rating scored74%from 54 tests.

About plugin

  • Plugin page: ewz-rating
  • Plugin version: 1.1.23
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-5.9.1
  • WordPress version: 6.3.1
  • First release: Dec 6, 2015
  • Latest release: Feb 25, 2022
  • Number of updates: 96
  • Update frequency: every 24.4 days
  • Top authors: joanne123 (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

80+ active /4,444 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
This plugin's installer ran successfully

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

Server-side resources used by EWZ-Rating
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0034.87 ▼4.14
Dashboard /wp-admin3.31 ▼0.0444.07 ▼22.21
Posts /wp-admin/edit.php3.36 ▲0.0048.36 ▼5.97
Add New Post /wp-admin/post-new.php5.89 ▲0.0079.62 ▼29.97
Media Library /wp-admin/upload.php3.23 ▲0.0032.82 ▲0.45

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 54 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_theysaidso_widget
widget_recent-comments
widget_recent-posts
can_compress_scripts
theysaidso_admin_options

Browser metrics Passed 4 tests

EWZ-Rating: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲2913.23 ▼1.121.75 ▼0.1640.19 ▼2.71
Dashboard /wp-admin2,206 ▲155.85 ▲0.95103.06 ▲1.3140.13 ▼7.72
Posts /wp-admin/edit.php2,089 ▼01.99 ▲0.0136.68 ▼6.5432.08 ▼9.86
Add New Post /wp-admin/post-new.php1,547 ▲2818.34 ▼4.75638.79 ▲0.0178.25 ▲30.90
Media Library /wp-admin/upload.php1,382 ▼94.21 ▼0.0696.62 ▼2.1340.43 ▼1.99

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
These items require your attention
  • Uninstall procedure validation failed for this plugin
    • > Warning in wp-content/plugins/ewz-rating/uninstall.php+75
    rmdir(wp-content/uploads/ewzr_test_images): No such file or directory
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options

Smoke tests 75% 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 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Almost there! Just fix the following items
  • 7× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      require_once(): Failed opening required 'EWZ_RATING_DIRclasses/ewz-rating-form.php' (include_path='.:/usr/share/php') in wp-content/plugins/ewz-rating/classes/validation/ewz-rating-form-set-input.php on line 2
    • > PHP Warning
      require_once(EWZ_RATING_DIRclasses/ewz-rating-scheme.php): failed to open stream: No such file or directory in wp-content/plugins/ewz-rating/classes/validation/ewz-rating-scheme-set-input.php on line 2
    • > EWZ
      Attempt to uninstall without WP_UNINSTALL_PLUGIN defined
    • > PHP Warning
      Use of undefined constant EWZ_RATING_DIR - assumed 'EWZ_RATING_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/ewz-rating/classes/validation/ewz-rating-scheme-set-input.php on line 2
    • > PHP Fatal error
      require_once(): Failed opening required 'EWZ_RATING_DIRclasses/ewz-rating-scheme.php' (include_path='.:/usr/share/php') in wp-content/plugins/ewz-rating/classes/validation/ewz-rating-scheme-set-input.php on line 2
    • > PHP Warning
      require_once(EWZ_RATING_DIRclasses/ewz-rating-form.php): failed to open stream: No such file or directory in wp-content/plugins/ewz-rating/classes/validation/ewz-rating-form-set-input.php on line 2
    • > PHP Warning
      Use of undefined constant EWZ_RATING_DIR - assumed 'EWZ_RATING_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/ewz-rating/classes/validation/ewz-rating-form-set-input.php on line 2

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 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
These attributes need your attention:
  • Screenshots: Add images for these screenshots: #1 (The rating-scheme administration page), #2 (The rating-form administration page), #3 (The output of the shortcode in a front-end page.)
You can take inspiration from this readme.txt

ewz-rating/ewz-rating.php Passed 13 tests

This is the main PHP file of "EWZ-Rating" version 1.1.23, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
81 characters long description:
Add-On plugin for EntryWizard. Allows uploaded images to be reviewed and judged.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
No dangerous file extensions were detected10,912 lines of code in 29 files:
LanguageFilesBlank linesComment linesLines of code
PHP211,0071,8937,464
JavaScript54712143,240
CSS34022208

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.53
Average class complexity74.38
▷ Minimum class complexity8.00
▷ Maximum class complexity332.00
Average method complexity6.80
▷ Minimum method complexity1.00
▷ Maximum method complexity38.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes13
▷ Abstract classes00.00%
▷ Concrete classes13100.00%
▷ Final classes00.00%
Methods165
▷ Static methods7243.64%
▷ Public methods13280.00%
▷ Protected methods2313.94%
▷ Private methods106.06%
Functions65
▷ Named functions6295.38%
▷ Anonymous functions34.62%
Constants25
▷ Global constants1976.00%
▷ Class constants624.00%
▷ Public constants6100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
18 PNG files occupy 0.05MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
styles/images/ui-icons_454545_256x240.png4.27KB4.11KB▼ 3.78%
styles/images/ui-icons_ffffff_256x240.png4.27KB4.11KB▼ 3.78%
styles/images/ui-icons_888888_256x240.png4.27KB4.11KB▼ 3.78%
styles/images/ui-bg_flat_0_aaaaaa_40x100.png0.18KB0.08KB▼ 51.67%
styles/images/ui-bg_flat_0_888888_40x100.png0.17KB0.08KB▼ 51.40%