89% lotto

Code Review | Lotto

WordPress plugin Lotto scored89%from 54 tests.

About plugin

  • Plugin page: lotto
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Aug 12, 2018
  • Latest release: May 29, 2023
  • Number of updates: 22
  • Update frequency: every 79.6 days
  • Top authors: oligalma (100%)

Code review

54 tests

User reviews

1 review

Install metrics

50+ active /1,881 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▲0.02MB] [CPU: ▼10.11ms] Passed 4 tests

Server-side resources used by Lotto
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0339.99 ▼0.59
Dashboard /wp-admin3.34 ▼0.0148.78 ▼7.78
Posts /wp-admin/edit.php3.39 ▲0.0343.56 ▼6.65
Add New Post /wp-admin/post-new.php5.92 ▲0.0383.21 ▼25.41
Media Library /wp-admin/upload.php3.26 ▲0.0336.54 ▲0.73

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 5 new files
Database: no new tables, 7 new options
New WordPress options
widget_lotto
theysaidso_admin_options
widget_recent-posts
widget_theysaidso_widget
db_upgraded
can_compress_scripts
widget_recent-comments

Browser metrics Passed 4 tests

A check of browser resources used by Lotto
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲4713.93 ▼0.421.55 ▼0.3638.59 ▼7.06
Dashboard /wp-admin2,192 ▲125.55 ▼0.1290.36 ▼0.1741.56 ▼4.61
Posts /wp-admin/edit.php2,100 ▼02.01 ▲0.0135.21 ▼2.6532.37 ▼5.60
Add New Post /wp-admin/post-new.php1,526 ▼022.98 ▼0.06590.24 ▼26.6782.89 ▲12.17
Media Library /wp-admin/upload.php1,403 ▼04.19 ▲0.03104.22 ▲3.3241.03 ▼0.77

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 7 options
    • can_compress_scripts
    • widget_lotto
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-comments

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP Passed 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
The SRP test was a success

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Attributes that require attention:
  • Screenshots: No descriptions were found for these screenshots #1, #2 in lotto/assets to your readme.txt
  • Contributors: Plugin contributors not specified
The official readme.txt might help

lotto/lotto.php Passed 13 tests

"Lotto" version 1.1's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
95 characters long description:
This plugin consists in a widget which displays random lotto numbers when clicking on a button.

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
There were no executable files found in this plugin197 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP12713161
CSS15036

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.57
Average class complexity19.00
▷ Minimum class complexity19.00
▷ Maximum class complexity19.00
Average method complexity5.50
▷ Minimum method complexity1.00
▷ Maximum method complexity10.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%
Functions2
▷ Named functions150.00%
▷ Anonymous functions150.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