84% fuelprice-australia

Code Review | FuelPrice Australia

WordPress plugin FuelPrice Australia scored84%from 54 tests.

About plugin

  • Plugin page: fuelprice-australia
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 2.9.2-5.0.2
  • WordPress version: 6.3.1
  • First release: Jan 7, 2019
  • Latest release: Jan 8, 2019
  • Number of updates: 9
  • Update frequency: N/A
  • Top authors: visser (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /624 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.04MB] [CPU: ▼6.51ms] Passed 4 tests

This is a short check of server-side resources used by FuelPrice Australia
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0545.74 ▼0.09
Dashboard /wp-admin3.35 ▲0.0150.79 ▼15.82
Posts /wp-admin/edit.php3.40 ▲0.0551.90 ▲1.55
Add New Post /wp-admin/post-new.php5.93 ▲0.0586.13 ▼11.68
Media Library /wp-admin/upload.php3.28 ▲0.0545.80 ▲9.75

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for FuelPrice Australia
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲4314.23 ▼0.131.72 ▼0.4544.45 ▼0.18
Dashboard /wp-admin2,195 ▲155.55 ▲0.0492.37 ▼4.9838.62 ▼7.50
Posts /wp-admin/edit.php2,100 ▼02.00 ▲0.0439.09 ▲2.6737.86 ▲0.70
Add New Post /wp-admin/post-new.php1,526 ▼223.51 ▲0.36668.96 ▼25.5250.80 ▼23.52
Media Library /wp-admin/upload.php1,403 ▲34.18 ▼0.0398.35 ▼18.5243.60 ▼5.53

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 7 options
    • db_upgraded
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_fuelprice_widget
    • theysaidso_admin_options
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, 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 take a closer look at the following
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/fuelprice-australia/includes/widget.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 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
5 plugin tags: widget, fuel, australia, fuelprice, price

fuelprice-australia/fuelprice-australia.php 92% from 13 tests

The main PHP file in "FuelPrice Australia" ver. 1.1 adds more information about the plugin and also serves as the entry point for this plugin
The following require your attention:
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
No dangerous file extensions were detected182 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP34521182

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.34
Average class complexity35.00
▷ Minimum class complexity35.00
▷ Maximum class complexity35.00
Average method complexity9.50
▷ Minimum method complexity1.00
▷ Maximum method complexity16.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%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.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
No PNG images were found in this plugin