84% odds-converter

Code Review | Oddsconverter

WordPress plugin Oddsconverter scored84%from 54 tests.

About plugin

  • Plugin page: odds-converter
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.7-5.4.2
  • WordPress version: 6.3.1
  • First release: Apr 1, 2014
  • Latest release: Jul 28, 2020
  • Number of updates: 9
  • Update frequency: every 256.8 days
  • Top authors: Modulout (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,198 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.02MB] [CPU: ▼0.89ms] Passed 4 tests

Analyzing server-side resources used by Oddsconverter
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0243.76 ▼1.11
Dashboard /wp-admin3.32 ▲0.0254.02 ▲0.75
Posts /wp-admin/edit.php3.38 ▲0.0249.35 ▲1.33
Add New Post /wp-admin/post-new.php5.91 ▲0.0290.91 ▼3.44
Media Library /wp-admin/upload.php3.25 ▲0.0237.61 ▲0.23

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 4 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-comments
widget_recent-posts
widget_theysaidso_widget
can_compress_scripts
db_upgraded
theysaidso_admin_options
widget_bsoddsconverter

Browser metrics Passed 4 tests

Checking browser requirements for Oddsconverter
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,870 ▲10913.44 ▼0.908.91 ▲7.1639.08 ▼8.42
Dashboard /wp-admin2,192 ▲125.55 ▼0.1196.66 ▼3.9041.71 ▼2.85
Posts /wp-admin/edit.php2,103 ▲31.96 ▼0.0335.92 ▼4.9336.52 ▼1.78
Add New Post /wp-admin/post-new.php1,531 ▼623.09 ▼0.03697.54 ▲35.4847.36 ▼20.98
Media Library /wp-admin/upload.php1,400 ▲34.22 ▲0.05101.94 ▲0.7744.37 ▼1.40

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • The uninstall procedure has failed, leaving 7 options in the database
    • widget_bsoddsconverter
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Everything seems fine, however this is by no means 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 fix the following
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/odds-converter/BSoddsConverter.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/odds-converter/BSoddsConverter.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
These attributes need your attention:
  • Plugin Name: You should set the name of your plugin on the first line ( === odds-converter === )
You can look at the official readme.txt

odds-converter/oddsconverter.php 92% from 13 tests

The main PHP script in "Oddsconverter" version 1.0.1 is automatically included on every request by WordPress
Please make the necessary changes and fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("odds-converter.php" instead of "oddsconverter.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Good job! No executable or dangerous file extensions detected204 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript1110144
PHP23860

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.10
Average class complexity4.00
▷ Minimum class complexity4.00
▷ Maximum class complexity4.00
Average method complexity1.60
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods5
▷ Static methods120.00%
▷ Public methods5100.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

Often times overlooked, PNG files can occupy unnecessary space in your plugin
No PNG files were detected