84% flippa-estimate-your-business

Code Review | Flippa Online Business Valuation Plugin

WordPress plugin Flippa Online Business Valuation Plugin scored84%from 54 tests.

About plugin

  • Plugin page: flippa-estimate-y...
  • Plugin version: 1.0.2
  • PHP compatiblity: 5.6.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-5.4.2
  • WordPress version: 6.3.1
  • First release: Jun 24, 2020
  • Latest release: Jul 16, 2020
  • Number of updates: 5
  • Update frequency: every 4.6 days
  • Top authors: flippa (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /535 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.08MB] [CPU: ▼1.39ms] Passed 4 tests

Server-side resources used by Flippa Online Business Valuation Plugin
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.57 ▲0.0741.40 ▲0.46
Dashboard /wp-admin3.42 ▲0.0753.15 ▼3.81
Posts /wp-admin/edit.php3.53 ▲0.1352.96 ▲0.68
Add New Post /wp-admin/post-new.php6.02 ▲0.0996.31 ▼2.90
Media Library /wp-admin/upload.php3.34 ▲0.0737.82 ▲4.26

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 14 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-posts
widget_recent-comments
can_compress_scripts
widget_theysaidso_widget
db_upgraded

Browser metrics Passed 4 tests

This is an overview of browser requirements for Flippa Online Business Valuation Plugin
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,854 ▲9314.24 ▼0.141.94 ▲0.1542.76 ▲2.29
Dashboard /wp-admin2,235 ▲615.54 ▲0.0296.47 ▲1.2140.41 ▼3.84
Posts /wp-admin/edit.php2,143 ▲402.85 ▲0.8346.69 ▲5.0335.97 ▼3.16
Add New Post /wp-admin/post-new.php1,548 ▲2023.69 ▲0.54690.95 ▲73.5938.72 ▼11.13
Media Library /wp-admin/upload.php1,444 ▲445.12 ▲0.92108.25 ▼3.1143.89 ▲0.73

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget
    • 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
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following
  • 6× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_bloginfo() in wp-content/plugins/flippa-estimate-your-business/includes/__constants.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function flippa\\plugin_dir_url() in wp-content/plugins/flippa-estimate-your-business/FlippaPlugin.php:40
    • > PHP Warning
      Use of undefined constant FLIPPA_PLUGIN_ROOT - assumed 'FLIPPA_PLUGIN_ROOT' (this will throw an Error in a future version of PHP) in wp-content/plugins/flippa-estimate-your-business/includes/__constants.php on line 5
    • > PHP Warning
      Use of undefined constant FLIPPA_DS - assumed 'FLIPPA_DS' (this will throw an Error in a future version of PHP) in wp-content/plugins/flippa-estimate-your-business/includes/__constants.php on line 5
    • > PHP Fatal error
      Uncaught Error: Class 'flippa\\FlippaCalculator' not found in wp-content/plugins/flippa-estimate-your-business/templates/flippa_api_estimate.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function flippa\\add_action() in wp-content/plugins/flippa-estimate-your-business/includes/FlippaAdmin.php:9

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

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
7 plugin tags: ecommerce, online, business, store, valuation...

flippa-estimate-your-business/FlippaPlugin.php 85% from 13 tests

The main PHP file in "Flippa Online Business Valuation Plugin" ver. 1.0.2 adds more information about the plugin and also serves as the entry point for this plugin
It is important to fix the following:
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug
  • Main file name: Name the main plugin file the same as the plugin slug ("flippa-estimate-your-business.php" instead of "FlippaPlugin.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
Good job! No executable or dangerous file extensions detected16,093 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript23,1472,61315,126
PHP614111582
CSS1731374
SVG20011

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.25
Average class complexity14.00
▷ Minimum class complexity3.00
▷ Maximum class complexity22.00
Average method complexity2.95
▷ Minimum method complexity1.00
▷ Maximum method complexity13.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods22
▷ Static methods1986.36%
▷ Public methods2195.45%
▷ Protected methods00.00%
▷ Private methods14.55%
Functions4
▷ Named functions250.00%
▷ Anonymous functions250.00%
Constants10
▷ Global constants10100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
No PNG images were found in this plugin