81% fifth-insight

Code Review | Fifth Insight

WordPress plugin Fifth Insight scored 81% from 54 tests.

About plugin

  • Plugin page: fifth-insight
  • Plugin version: 2.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.2-5.4.2
  • WordPress version: 5.8.1
  • First release: Oct 10, 2019
  • Latest release: Jun 28, 2020
  • Number of updates: 4
  • Update frequency: every 67.0 days
  • Top authors: catalystbrains (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 391 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.09MB] [CPU: ▼142.26ms] Passed 4 tests

A check of server-side resources used by Fifth Insight
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.91 ▲0.0847.89 ▲6.65
Dashboard /wp-admin3.16 ▲0.1054.86 ▼0.03
Posts /wp-admin/edit.php3.24 ▲0.1356.34 ▲3.61
Add New Post /wp-admin/post-new.php5.51 ▲0.0894.23 ▼573.03
Media Library /wp-admin/upload.php3.10 ▲0.1039.31 ▲0.40
FifthInsight /wp-admin/admin.php?page=analyze-performance3.0737.26
Settings /wp-admin/admin.php?page=performance-setting3.0735.24
Overview /wp-admin/admin.php?page=performance-report3.0537.66
Comparison /wp-admin/admin.php?page=performance-comparison3.0535.84
Full Report /wp-admin/admin.php?page=performance-full-report3.0744.36

Server storage [IO: ▲0.34MB] [DB: ▲0.00MB] 67% from 3 tests

A short overview of filesystem and database impact
Just a few items left to fix
  • Illegal file modification found: 1 file (0.00KB) outside of "wp-content/plugins/fifth-insight/" and "wp-content/uploads/"
    • (new file) wp-content/data/.empty
Filesystem: 33 new files
Database: 2 new tables, no new options
New tables
wp_fifth_insight_report
wp_fifth_insight_api_key

Browser metrics Passed 4 tests

An overview of browser requirements for Fifth Insight
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,763 ▲16816.26 ▲0.6310.56 ▼0.9159.12 ▲6.56
Dashboard /wp-admin3,028 ▲946.68 ▲0.74170.94 ▲6.52127.60 ▲2.89
Posts /wp-admin/edit.php2,800 ▲613.01 ▲0.2978.27 ▲8.70136.98 ▲39.32
Add New Post /wp-admin/post-new.php1,660 ▼2321.82 ▲3.10312.16 ▼107.58134.47 ▲7.30
Media Library /wp-admin/upload.php1,868 ▲615.38 ▲0.37165.98 ▲1.65148.85 ▲29.17
FifthInsight /wp-admin/admin.php?page=analyze-performance1,2662.5662.89128.33
Settings /wp-admin/admin.php?page=performance-setting1,3732.5783.04132.48
Overview /wp-admin/admin.php?page=performance-report1,3842.5762.21130.23
Comparison /wp-admin/admin.php?page=performance-comparison1,3872.5766.20128.54
Full Report /wp-admin/admin.php?page=performance-full-report1,3842.5668.97129.14

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The plugin uninstalled completely, with no zombie files or tables

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
These server-side errors were triggered
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=performance-comparison
    • > Notice in wp-content/plugins/fifth-insight/includes/hooks.php+126
    Only variables should be passed by reference
  • 6 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=performance-full-report
    • > Notice in wp-content/plugins/fifth-insight/includes/ajax.php+15
    Trying to get property 'api_key' of non-object
    • > GET request to /wp-admin/admin.php?page=performance-report
    • > POST request to /wp-admin/admin-ajax.php
    • > Notice in wp-content/plugins/fifth-insight/includes/hooks.php+59
    Trying to access array offset on value of type null
    • > GET request to /wp-admin/admin.php?page=performance-comparison
    • > Notice in wp-content/plugins/fifth-insight/includes/hooks.php+119
    Undefined offset: 0
    • > GET request to /wp-admin/admin.php?page=performance-comparison
    • > Notice in wp-content/plugins/fifth-insight/includes/hooks.php+119
    Trying to get property 'url' of non-object
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=performance-full-report
    • > Notice in wp-content/plugins/fifth-insight/includes/ajax.php+15
    Undefined variable: result

SRP 0% 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
The following issues need your attention
  • 3× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/fifth-insight/includes/header.php
    • > /wp-content/plugins/fifth-insight/index.php
    • > /wp-content/plugins/fifth-insight/includes/modal.php
  • 17× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function home_url() in wp-content/plugins/fifth-insight/includes/ajax.php:15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/fifth-insight/front/full_report_.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/fifth-insight/front/comparison.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/fifth-insight/front/dashboard.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function admin_url() in wp-content/plugins/fifth-insight/includes/topbar_.php:2
    • > PHP Notice
      Undefined variable: output in wp-content/plugins/fifth-insight/includes/header.php on line 7
    • > PHP Notice
      Undefined variable: desktop in wp-content/plugins/fifth-insight/includes/desktop.php on line 2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function admin_url() in wp-content/plugins/fifth-insight/includes/desktop.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/fifth-insight/front/full_report.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/fifth-insight/front/report.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser issues were found

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Attributes that need to be fixed:
  • Plugin Name: Please replace "Plugin Name" with the name of your plugin on the first line ( === fifth-insight === )
  • Requires php: Invalid version format
The official readme.txt might help

fifth-insight/index.php 85% from 13 tests

The main file in "Fifth Insight" v. 2.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
It is important to fix the following:
  • Text Domain: The text domain name must use dashes instead of underscores, and it must be lowercase
  • Main file name: The principal plugin file should be the same as the plugin slug ("fifth-insight.php" instead of "index.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
There were no executable files found in this plugin1,643 lines of code in 31 files:
LanguageFilesBlank linesComment linesLines of code
PHP20418321,467
CSS4369157
JavaScript541917
SVG2002

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.21
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions24
▷ Named functions24100.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
PNG images were not found in this plugin