78% odds-comparison-by-oddsvalue

Code Review | Odds Comparison

WordPress plugin Odds Comparison scored78%from 54 tests.

About plugin

  • Plugin page: odds-comparison-b...
  • Plugin version: 1.12
  • PHP version: 7.4.16
  • WordPress compatibility: 1.0-4.8.1
  • WordPress version: 6.3.1
  • First release: Apr 7, 2017
  • Latest release: Sep 11, 2017
  • Number of updates: 13
  • Update frequency: every 12.1 days
  • Top authors: sorengolf (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,746 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.17MB] [CPU: ▼2.48ms] Passed 4 tests

Analyzing server-side resources used by Odds Comparison
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.57 ▲0.1037.76 ▼0.14
Dashboard /wp-admin3.49 ▲0.1946.05 ▼0.13
Posts /wp-admin/edit.php3.60 ▲0.2548.83 ▲2.73
Add New Post /wp-admin/post-new.php6.09 ▲0.2085.84 ▼10.23
Media Library /wp-admin/upload.php3.41 ▲0.1833.55 ▲0.59
Odds Comparison /wp-admin/options-general.php?page=odds-comparison-by-oddsvalue/odds-comparison.php3.3831.42

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Odds Comparison
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,903 ▲14213.86 ▼0.498.08 ▲6.3635.72 ▼4.60
Dashboard /wp-admin2,198 ▲185.66 ▲0.0793.39 ▲2.2040.02 ▼0.69
Posts /wp-admin/edit.php2,106 ▲62.01 ▲0.0541.76 ▲6.3235.88 ▼3.39
Add New Post /wp-admin/post-new.php1,531 ▲323.76 ▲0.63678.88 ▲73.6652.86 ▼17.49
Media Library /wp-admin/upload.php1,409 ▲154.13 ▼0.09100.07 ▼11.3941.76 ▼6.31
Odds Comparison /wp-admin/options-general.php?page=odds-comparison-by-oddsvalue/odds-comparison.php1,4281.8224.2331.41

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please take a closer look at the following
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/odds-comparison-by-oddsvalue/odds-comparison.php:77

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There are user-side issues you should fix
    • > GET request to /wp-admin/options-general.php?page=odds-comparison-by-oddsvalue/odds-comparison.php
    • > Console-api (warning) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1 1:28609 "jQuery.Deferred exception: $(...).wpColorPicker is not a function" "TypeError: $(...).wpColorPicker is not a function\n at HTMLDocument.\u003Canonymous> (/wp-content/plugins/odds-comparison-by-oddsvalue/jquery.custom.js?ver=6.3.1:5:34)\n at e (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1:2:26990)\n at t (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1:2:27292)" undefined
    • > GET request to /wp-admin/options-general.php?page=odds-comparison-by-oddsvalue/odds-comparison.php
    • > Javascript (severe) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1 1:28721 Uncaught TypeError: $(...).wpColorPicker is not a function

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
These attributes need your attention:
  • Tags: You are using too many tags: 19 tag instead of maximum 10
  • Screenshots: These screenshots do not have images: #1 (Navigation Menu), #2 (Competition overview), #3 (Event overview)
You can look at the official readme.txt

odds-comparison-by-oddsvalue/odds-comparison.php 92% from 13 tests

The entry point to "Odds Comparison" version 1.12 is a PHP file that has certain tags in its header comment area
Please make the necessary changes and fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("odds-comparison-by-oddsvalue.php" instead of "odds-comparison.php")

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 plugin355 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP112257350
JavaScript1215

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.39
Average class complexity73.00
▷ Minimum class complexity73.00
▷ Maximum class complexity73.00
Average method complexity4.55
▷ Minimum method complexity1.00
▷ Maximum method complexity36.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods21
▷ Static methods14.76%
▷ Public methods1676.19%
▷ Protected methods00.00%
▷ Private methods523.81%
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
There are no PNG files in this plugin