10% uk-competition-entry-form

Code Review | UK Competition entry widget plugin for WordPress

WordPress plugin UK Competition entry widget plugin for WordPress scored 10% from 54 tests.

About plugin

  • Plugin page: uk-competition-en...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-3.5
  • WordPress version: 6.3.1
  • First release: Dec 25, 2012
  • Latest release: Dec 26, 2012
  • Number of updates: 11
  • Update frequency: every 0.1 days
  • Top authors: gary.solomon@gmail.com (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 740 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
It is recommended to fix the following installer errors
  • Install procedure had errors
    • > Deprecated in wp-content/plugins/uk-competition-entry-form/competitions.php+55
    Function create_function() is deprecated

Server metrics [RAM: ▼1.96MB] [CPU: ▼52.52ms] Passed 4 tests

Server-side resources used by UK Competition entry widget plugin for WordPress
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.03 ▼1.434.34 ▼39.30
Dashboard /wp-admin2.05 ▼1.266.90 ▼41.02
Posts /wp-admin/edit.php2.05 ▼1.317.26 ▼40.51
Add New Post /wp-admin/post-new.php2.05 ▼3.846.11 ▼89.26
Media Library /wp-admin/upload.php2.05 ▼1.185.70 ▼30.46

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for UK Competition entry widget plugin for WordPress
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6514.48 ▼0.101.47 ▼0.6442.31 ▼7.44
Dashboard /wp-admin2,206 ▲185.86 ▲0.95105.45 ▲2.3942.10 ▼2.08
Posts /wp-admin/edit.php2,089 ▼02.00 ▲0.0339.58 ▲1.0734.28 ▼1.43
Add New Post /wp-admin/post-new.php1,542 ▲918.47 ▼4.65605.88 ▼63.4651.84 ▼10.88
Media Library /wp-admin/upload.php1,388 ▲34.19 ▼0.0695.67 ▼5.3442.02 ▼1.87

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
  • The plugin did not uninstall gracefully
    • > Deprecated in wp-content/plugins/uk-competition-entry-form/competitions.php+55
    Function create_function() is deprecated
  • This plugin does not fully uninstall, leaving 7 options in the database
    • widget_competitionwidget
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

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× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/uk-competition-entry-form/competitions.php:13

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Attributes that need to be fixed: The official readme.txt might help

uk-competition-entry-form/competitions.php 85% from 13 tests

"UK Competition entry widget plugin for WordPress" version 1.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
It is important to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("uk-competition-entry-form.php" instead of "competitions.php")
  • Description: Keep the plugin description shorter than 140 characters (currently 195 characters long)

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 plugin35 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP191135

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.10
Average class complexity3.00
▷ Minimum class complexity3.00
▷ Maximum class complexity3.00
Average method complexity1.50
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
No PNG images were found in this plugin