10% taxi-fare-calculator-by-taxifarefindercom

Code Review | Taxi Fare Calculator - TaxiFareFinder for WordPress

WordPress plugin Taxi Fare Calculator - TaxiFareFinder for WordPress scored10%from 54 tests.

About plugin

  • Plugin page: taxi-fare-calcula...
  • Plugin version: 1.1.1
  • PHP compatiblity: 5.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.2.1-5.1
  • WordPress version: 6.3.1
  • First release: Nov 30, 2013
  • Latest release: Mar 20, 2019
  • Number of updates: 31
  • Update frequency: every 62.5 days
  • Top authors: IppTak (93.55%)cjh79 (9.68%)

Code review

54 tests

User reviews

1 review

Install metrics

50+ active /6,178 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
You still need to fix the following installer errors
  • The plugin did not install without errors
    • > Deprecated in wp-content/plugins/taxi-fare-calculator-by-taxifarefindercom/taxifarefinder-widget.php+8
    Methods with the same name as their class will not be constructors in a future version of PHP; TaxiFareFinder_Widget has a deprecated constructor

Server metrics [RAM: ▼1.86MB] [CPU: ▼50.88ms] Passed 4 tests

An overview of server-side resources used by Taxi Fare Calculator - TaxiFareFinder for WordPress
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.13 ▼1.344.86 ▼34.02
Dashboard /wp-admin2.15 ▼1.166.06 ▼40.50
Posts /wp-admin/edit.php2.15 ▼1.216.37 ▼41.13
Add New Post /wp-admin/post-new.php2.15 ▼3.746.85 ▼87.88
Media Library /wp-admin/upload.php2.15 ▼1.086.36 ▼27.68
TaxiFareFinder /wp-admin/options-general.php?page=taxi-fare-calculator-by-taxifarefindercom/taxifarefinder.php2.156.72

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 20 new files
Database: no new tables, 7 new options
New WordPress options
can_compress_scripts
widget_recent-comments
db_upgraded
widget_recent-posts
widget_theysaidso_widget
widget_taxifarefinder
theysaidso_admin_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Taxi Fare Calculator - TaxiFareFinder for WordPress
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,920 ▲17413.96 ▼0.598.22 ▲6.6842.57 ▲3.54
Dashboard /wp-admin2,212 ▲274.87 ▼1.00104.81 ▲5.1542.03 ▲4.48
Posts /wp-admin/edit.php2,095 ▲62.01 ▼0.0138.34 ▲2.3335.05 ▲1.05
Add New Post /wp-admin/post-new.php1,519 ▼1618.00 ▼5.18659.74 ▼41.9360.17 ▲2.11
Media Library /wp-admin/upload.php1,394 ▲64.24 ▼0.0193.29 ▼8.0842.03 ▼3.02
TaxiFareFinder /wp-admin/options-general.php?page=taxi-fare-calculator-by-taxifarefindercom/taxifarefinder.php8472.1624.3324.98

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • This plugin cannot be uninstalled
    • > Deprecated in wp-content/plugins/taxi-fare-calculator-by-taxifarefindercom/taxifarefinder-widget.php+8
    Methods with the same name as their class will not be constructors in a future version of PHP; TaxiFareFinder_Widget has a deprecated constructor
  • Zombie WordPress options were found after uninstall: 7 options
    • db_upgraded
    • widget_recent-comments
    • widget_taxifarefinder
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
These errors were triggered by the plugin
    • > GET request to /wp-admin/options-general.php?page=taxi-fare-calculator-by-taxifarefindercom/taxifarefinder.php
    • > Deprecated in wp-content/plugins/taxi-fare-calculator-by-taxifarefindercom/taxifarefinder-widget.php+8
    Methods with the same name as their class will not be constructors in a future version of PHP; TaxiFareFinder_Widget has a deprecated constructor
    • > GET request to /wp-admin/options-general.php?page=taxi-fare-calculator-by-taxifarefindercom/taxifarefinder.php
    • > User deprecated in wp-includes/functions.php+5546
    The called constructor method for WP_Widget class in TaxiFareFinder_Widget is deprecated since version 4.3.0! Use __construct() instead.
    • > GET request to /wp-admin/options-general.php?page=taxi-fare-calculator-by-taxifarefindercom/taxifarefinder.php
    • > User notice in wp-includes/functions.php+5905
    Function add_submenu_page was called incorrectly. The seventh parameter passed to add_submenu_page() should be numeric representing menu position. Please see Debugging in WordPress for more information. (This message was added in version 5.3.0.)
    • > GET request to /wp-admin/options-general.php?page=taxi-fare-calculator-by-taxifarefindercom/taxifarefinder.php
    • > User deprecated in wp-includes/functions.php+5463
    Function screen_icon is deprecated since version 3.8.0 with no alternative available.
    • > GET request to /wp-admin/options-general.php?page=taxi-fare-calculator-by-taxifarefindercom/taxifarefinder.php
    • > User deprecated in wp-includes/functions.php+5463
    Function get_screen_icon is deprecated since version 3.8.0 with no alternative available.

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
  • 2× 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/taxi-fare-calculator-by-taxifarefindercom/taxifarefinder-widget.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/taxi-fare-calculator-by-taxifarefindercom/taxifarefinder-widget.php:8

User-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There are user-side issues you should fix
    • > GET request to /wp-admin/options-general.php?page=taxi-fare-calculator-by-taxifarefindercom/taxifarefinder.php
    • > Network (severe)
    wp-content/plugins/taxi-fare-calculator-by-taxifarefindercom/js/taxifarefinder-admin.js?ver=6.3.1 - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
8 plugin tags: cab, calculator, taxicab, taxi, fare...

taxi-fare-calculator-by-taxifarefindercom/taxifarefinder.php 92% from 13 tests

The main PHP script in "Taxi Fare Calculator - TaxiFareFinder for WordPress" version 1.1.1 is automatically included on every request by WordPress
You should first fix the following items:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("taxi-fare-calculator-by-taxifarefindercom.php" instead of "taxifarefinder.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Success! There were no dangerous files found in this plugin442 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP28363319
JavaScript112785
CSS110138

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.19
Average class complexity13.00
▷ Minimum class complexity13.00
▷ Maximum class complexity13.00
Average method complexity3.40
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods5
▷ Static methods00.00%
▷ Public methods5100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions8
▷ Named functions8100.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
13 PNG files occupy 0.08MB with 0.04MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/tffpower-rectwhite300x50.png7.31KB4.22KB▼ 42.24%
images/tffpower-rectwhite150x25.png5.10KB2.71KB▼ 46.91%
images/tffpower-boxblack130x130.png7.59KB4.26KB▼ 43.87%
images/tfflogo90.png4.20KB2.75KB▼ 34.49%
images/tffpower-boxyellow130x130.png7.20KB4.01KB▼ 44.26%