10% lottery

Code Review | Lottery Results

WordPress plugin Lottery Results scored10%from 54 tests.

About plugin

  • Plugin page: lottery
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 2.8-4.0
  • WordPress version: 6.3.1
  • First release: Nov 8, 2010
  • Latest release: Sep 6, 2014
  • Number of updates: 12
  • Update frequency: every 116.6 days
  • Top authors: katzwebdesign (100%)

Code review

54 tests

User reviews

1 review

Install metrics

40+ active /5,761 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
It is recommended to fix the following installer errors
  • The plugin cannot be installed
    • > Deprecated in wp-content/plugins/lottery/lottery.php+53
    Methods with the same name as their class will not be constructors in a future version of PHP; LotteryWidget has a deprecated constructor

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

A check of server-side resources used by Lottery Results
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.31 ▼1.165.36 ▼37.55
Dashboard /wp-admin2.33 ▼1.026.15 ▼54.06
Posts /wp-admin/edit.php2.33 ▼1.036.78 ▼40.07
Add New Post /wp-admin/post-new.php2.33 ▼3.566.60 ▼83.64
Media Library /wp-admin/upload.php2.33 ▼0.906.07 ▼27.04

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Lottery Results
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,802 ▲5613.24 ▼1.131.78 ▼0.0444.29 ▲0.29
Dashboard /wp-admin2,203 ▲125.88 ▲0.02110.05 ▲3.6345.66 ▲3.96
Posts /wp-admin/edit.php2,089 ▼02.17 ▲0.1733.83 ▼2.7135.27 ▲2.39
Add New Post /wp-admin/post-new.php1,535 ▲1623.19 ▲0.09646.29 ▼17.8460.26 ▲5.86
Media Library /wp-admin/upload.php1,391 ▲34.19 ▲0.0197.77 ▼0.0843.69 ▲1.82

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • This plugin did not uninstall without warnings or errors
    • > Deprecated in wp-content/plugins/lottery/lottery.php+53
    Methods with the same name as their class will not be constructors in a future version of PHP; LotteryWidget has a deprecated constructor
  • Zombie WordPress options detected upon uninstall: 7 options
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_recent-posts
    • widget_lotterywidget
    • db_upgraded
    • can_compress_scripts
    • 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
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
The following issues need your attention
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/lottery/lottery.php:27

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% 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
These attributes need to be fixed:
  • Screenshots: These screenshots require images: #1 (How the widget appears in the Widgets panel), #2 (How the signup form appears in the sidebar of a site using the twentyten theme)
  • Tags: Please reduce the number of tags, currently 22 tag instead of maximum 10
The official readme.txt might help

lottery/lottery.php Passed 13 tests

The main file in "Lottery Results" v. 1.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
74 characters long description:
Feature daily lottery results on your website from every state in the USA.

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
There were no executable files found in this plugin712 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP110349560
CSS2103152

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.48
Average class complexity127.00
▷ Minimum class complexity127.00
▷ Maximum class complexity127.00
Average method complexity7.63
▷ Minimum method complexity1.00
▷ Maximum method complexity39.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods19
▷ Static methods00.00%
▷ Public methods19100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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
There were not PNG files found in your plugin