84% odds-comparison-widget

Code Review | Odds comparison Widget

WordPress plugin Odds comparison Widget scored84%from 54 tests.

About plugin

  • Plugin page: odds-comparison-w...
  • Plugin version: 1.0
  • PHP compatiblity: 5.6.20+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.1-5.2
  • WordPress version: 6.3.1
  • First release: Aug 9, 2019
  • Latest release: Aug 10, 2019
  • Number of updates: 5
  • Update frequency: every 0.2 days
  • Top authors: oddsnu (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /1,351 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Installer ran successfully

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

A check of server-side resources used by Odds comparison Widget
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0346.29 ▲1.41
Dashboard /wp-admin3.33 ▼0.0152.95 ▼10.64
Posts /wp-admin/edit.php3.38 ▲0.0348.83 ▼2.65
Add New Post /wp-admin/post-new.php5.91 ▲0.0385.51 ▼27.05
Media Library /wp-admin/upload.php3.25 ▲0.0339.52 ▲4.46

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 2 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-comments
widget_theysaidso_widget
theysaidso_admin_options
can_compress_scripts
db_upgraded
widget_recent-posts
widget_oddscomparisonwidget

Browser metrics Passed 4 tests

A check of browser resources used by Odds comparison Widget
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲4314.35 ▲0.001.74 ▼0.1245.68 ▲3.88
Dashboard /wp-admin2,198 ▲245.58 ▲0.0088.53 ▼9.3837.58 ▼7.26
Posts /wp-admin/edit.php2,100 ▼31.96 ▼0.0336.72 ▼1.8535.60 ▲0.26
Add New Post /wp-admin/post-new.php1,526 ▼023.52 ▲0.39651.48 ▼10.8251.55 ▼12.50
Media Library /wp-admin/upload.php1,394 ▼94.24 ▲0.0797.74 ▼4.4341.42 ▼1.00

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • Zombie WordPress options were found after uninstall: 7 options
    • db_upgraded
    • widget_theysaidso_widget
    • widget_oddscomparisonwidget
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/odds-comparison-widget/odds-comparison-plugin.php:12

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 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
4 plugin tags: odds, comparison, sports, betting

odds-comparison-widget/odds-comparison-plugin.php 92% from 13 tests

The principal PHP file in "Odds comparison Widget" v. 1.0 is loaded by WordPress automatically on each request
It is important to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("odds-comparison-widget.php" instead of "odds-comparison-plugin.php")

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

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.22
Average class complexity10.00
▷ Minimum class complexity10.00
▷ Maximum class complexity10.00
Average method complexity3.25
▷ Minimum method complexity1.00
▷ Maximum method complexity6.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%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
There are no PNG files in this plugin