58% wp-design-awards

Code Review | WP Design Awards

WordPress plugin WP Design Awards scored 58% from 54 tests.

About plugin

  • Plugin page: wp-design-awards
  • Plugin version: 1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-3.9
  • WordPress version: 5.8.1
  • First release: Apr 14, 2013
  • Latest release: Apr 16, 2014
  • Number of updates: 19
  • Update frequency: every 19.3 days
  • Top authors: Konstantinos_Tsatsarounos (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 1,599 total downloads

Benchmarks

Plugin footprint 48% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

Server metrics [RAM: ▼1.69MB] [CPU: ▼186.32ms] Passed 4 tests

An overview of server-side resources used by WP Design Awards
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /1.94 ▼0.789.97 ▼13.33
Dashboard /wp-admin1.96 ▼1.098.25 ▼35.75
Posts /wp-admin/edit.php1.96 ▼1.157.76 ▼37.15
Add New Post /wp-admin/post-new.php1.96 ▼3.478.05 ▼645.81
Media Library /wp-admin/upload.php1.96 ▼1.047.26 ▼26.57
Participants /wp-admin/edit-tags.php?taxonomy=Participants&post_type=design_awards1.969.00
Add new nomination /wp-admin/post-new.php?post_type=design_awards1.967.17
All Nominations /wp-admin/edit.php?post_type=design_awards1.966.90
Design Awards /wp-admin/options-general.php?page=wp-design-awards/files/settings_page.php1.967.99

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 45 new files
Database: 1 new table, 1 new option
New tables
wp_design_awards
New WordPress options
design_awards_database

Browser metrics Passed 4 tests

This is an overview of browser requirements for WP Design Awards
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,857 ▲26116.79 ▲1.1944.19 ▲34.6852.40 ▼12.97
Dashboard /wp-admin3,005 ▲715.97 ▼0.19142.56 ▼7.79143.06 ▲18.92
Posts /wp-admin/edit.php2,764 ▲252.61 ▼0.0864.66 ▼2.4196.66 ▼2.70
Add New Post /wp-admin/post-new.php1,704 ▲10018.99 ▲0.15371.49 ▼22.82125.29 ▲10.33
Media Library /wp-admin/upload.php1,790 ▼175.05 ▲0.02138.73 ▼25.59152.94 ▲23.09
Participants /wp-admin/edit-tags.php?taxonomy=Participants&post_type=design_awards1,7932.5059.5486.06
Add new nomination /wp-admin/post-new.php?post_type=design_awards3,7859.32241.51171.94
All Nominations /wp-admin/edit.php?post_type=design_awards1,4942.5659.5776.78
Design Awards /wp-admin/options-general.php?page=wp-design-awards/files/settings_page.php1,2042.3653.0392.38

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • The plugin did not uninstall gracefully
    • > User notice in wp-includes/functions.php+5663
    wp_register_style was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the kt_main_plugin_style handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • Zombie tables were found after uninstall: 1 table
    • wp_design_awards
  • The uninstall procedure has failed, leaving 1 option in the database
    • design_awards_database

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Please fix the following server-side errors
  • 5 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=wp-design-awards/files/settings_page.php
    • > User notice in wp-includes/functions.php+5663
    wp_register_style was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the kt_main_plugin_style handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • 5 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=wp-design-awards/files/settings_page.php
    • > User notice in wp-includes/functions.php+5663
    wp_register_style was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the kt_rating_css handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • 5 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=wp-design-awards/files/settings_page.php
    • > User notice in wp-includes/functions.php+5663
    wp_register_style was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the colorpicker_css handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • 5 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=wp-design-awards/files/settings_page.php
    • > User notice in wp-includes/functions.php+5663
    wp_register_style was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the aw_options_page_style handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
    • > GET request to /wp-admin/edit.php?post_type=design_awards
    • > Notice in wp-content/plugins/wp-design-awards/files/functions.php+716
    Trying to get property 'post_type' of non-object

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Almost there! Just fix the following items
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/wp-design-awards/plugin.php:30

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
2 plugin tags: gallery, design contest

wp-design-awards/plugin.php 85% from 13 tests

This is the main PHP file of "WP Design Awards" version 1, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
It is important to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("wp-design-awards.php" instead of "plugin.php")
  • Version: Plugin version number should only contain digits separated by dots (ex. "1.0.3" instead of "1")

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
Good job! No executable or dangerous file extensions detected1,794 lines of code in 17 files:
LanguageFilesBlank linesComment linesLines of code
PHP10838548897
CSS38220584
JavaScript417318313

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity18.00
▷ Minimum class complexity1.00
▷ Maximum class complexity36.00
Average method complexity2.84
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods37
▷ Static methods00.00%
▷ Public methods37100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions27
▷ Named functions27100.00%
▷ Anonymous functions00.00%
Constants10
▷ Global constants10100.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
15 PNG files occupy 0.05MB with 0.02MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
css/more.png2.67KB2.00KB▼ 25.15%
css/awards_icon.png3.21KB1.68KB▼ 47.66%
images/desaw_menu_icon.png1.23KB0.60KB▼ 51.23%
images/default_image_preview.png5.90KB3.19KB▼ 45.99%
css/link.png2.73KB2.01KB▼ 26.33%