84% tide-graph

Code Review | Tide Graph

WordPress plugin Tide Graph scored84%from 54 tests.

About plugin

  • Plugin page: tide-graph
  • Plugin version: 2.0
  • PHP version: 7.4.16
  • WordPress compatibility: 2.7.1-5.2.4
  • WordPress version: 6.3.1
  • First release: Mar 16, 2013
  • Latest release: Oct 30, 2019
  • Number of updates: 22
  • Update frequency: every 131.8 days
  • Top authors: bryanaamot (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

200+ active /4,430 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

Server metrics [RAM: ▲0.03MB] [CPU: ▼10.32ms] Passed 4 tests

Analyzing server-side resources used by Tide Graph
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0339.77 ▼7.01
Dashboard /wp-admin3.33 ▲0.0342.53 ▼10.02
Posts /wp-admin/edit.php3.38 ▲0.0349.23 ▲2.98
Add New Post /wp-admin/post-new.php5.91 ▲0.0381.92 ▼19.57
Media Library /wp-admin/upload.php3.25 ▲0.0332.71 ▼4.69

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 4 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-comments
widget_recent-posts
widget_theysaidso_widget
theysaidso_admin_options
can_compress_scripts
widget_tidegraph-widget
db_upgraded

Browser metrics Passed 4 tests

This is an overview of browser requirements for Tide Graph
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲1814.34 ▲0.061.63 ▼0.2643.71 ▲4.91
Dashboard /wp-admin2,195 ▲185.61 ▼0.0092.78 ▲4.2343.03 ▲2.58
Posts /wp-admin/edit.php2,103 ▲31.96 ▼0.0640.16 ▲4.9136.10 ▼3.44
Add New Post /wp-admin/post-new.php1,526 ▼323.74 ▲0.04663.36 ▼29.7451.44 ▼2.34
Media Library /wp-admin/upload.php1,397 ▼64.24 ▲0.0297.27 ▼9.4640.21 ▼5.01

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
You still need to fix the following
  • The uninstall procedure has failed, leaving 7 options in the database
    • widget_recent-posts
    • widget_tidegraph-widget
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
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
The following issues need your attention
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/tide-graph/trunk/tidegraph.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/tide-graph/tidegraph.php:11

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
4 plugin tags: tide, tides, ocean, water

tide-graph/tidegraph.php 92% from 13 tests

This is the main PHP file of "Tide Graph" version 2.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
You should first fix the following items:
  • Main file name: The principal plugin file should be the same as the plugin slug ("tide-graph.php" instead of "tidegraph.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
No dangerous file extensions were detected87 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1231587

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.06
Average class complexity4.00
▷ Minimum class complexity4.00
▷ Maximum class complexity4.00
Average method complexity1.75
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods8
▷ Static methods00.00%
▷ Public methods8100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
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
There are no PNG files in this plugin