84% wp-flot

Code Review | WP Flot

WordPress plugin WP Flot scored84%from 54 tests.

About plugin

  • Plugin page: wp-flot
  • Plugin version: 0.2.2
  • PHP version: 7.4.16
  • WordPress compatibility: 2.5-4.4
  • WordPress version: 6.3.1
  • First release: Feb 28, 2014
  • Latest release: Dec 15, 2015
  • Number of updates: 35
  • Update frequency: every 25.5 days
  • Top authors: YSH (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active /2,791 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed gracefully, with no errors

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

This is a short check of server-side resources used by WP Flot
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0638.36 ▼1.22
Dashboard /wp-admin3.36 ▲0.0145.60 ▼15.40
Posts /wp-admin/edit.php3.41 ▲0.0546.19 ▲0.50
Add New Post /wp-admin/post-new.php5.94 ▲0.0581.44 ▼19.40
Media Library /wp-admin/upload.php3.28 ▲0.0537.20 ▲1.75

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 12 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_theysaidso_widget
db_upgraded
can_compress_scripts
widget_recent-comments
widget_recent-posts

Browser metrics Passed 4 tests

WP Flot: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,908 ▲17314.12 ▼0.264.97 ▲3.0841.23 ▼1.95
Dashboard /wp-admin2,206 ▲186.04 ▲0.19107.33 ▼1.5938.05 ▼5.98
Posts /wp-admin/edit.php2,092 ▲31.98 ▼0.0339.68 ▲1.3834.82 ▼3.16
Add New Post /wp-admin/post-new.php1,533 ▲423.37 ▲4.98675.66 ▼2.0353.78 ▼1.38
Media Library /wp-admin/upload.php1,385 ▼04.29 ▲0.01100.05 ▼5.6339.96 ▼5.25

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The following items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
The following issues need your attention
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function load_plugin_textdomain() in wp-content/plugins/wp-flot/wpflot.php:30

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)
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
4 plugin tags: flot, chart, graph, shortcode

wp-flot/wpflot.php 92% from 13 tests

The main PHP script in "WP Flot" version 0.2.2 is automatically included on every request by WordPress
You should first fix the following items:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("wp-flot.php" instead of "wpflot.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Good job! No executable or dangerous file extensions detected511 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP15528392
PO File23794112
JavaScript410167

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.23
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%
Functions7
▷ Named functions685.71%
▷ Anonymous functions114.29%
Constants0
▷ Global constants00.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