83% chartlocal

Code Review | Chartlocal

WordPress plugin Chartlocal scored83%from 54 tests.

About plugin

  • Plugin page: chartlocal
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 2.7-5.0.3
  • WordPress version: 6.3.1
  • First release: Sep 11, 2019
  • Latest release: Sep 11, 2019
  • Number of updates: 2
  • Update frequency: every 2.0 days
  • Top authors: chartlocalweb (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /433 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed successfully, without throwing any errors or notices

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

Analyzing server-side resources used by Chartlocal
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0240.53 ▼1.49
Dashboard /wp-admin3.33 ▲0.0348.76 ▼2.69
Posts /wp-admin/edit.php3.39 ▲0.0346.96 ▼2.61
Add New Post /wp-admin/post-new.php5.92 ▲0.0388.55 ▼11.33
Media Library /wp-admin/upload.php3.26 ▲0.0342.45 ▲4.73

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Chartlocal
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,805 ▲4414.24 ▼0.111.87 ▼0.0642.97 ▼16.17
Dashboard /wp-admin2,211 ▲375.53 ▼0.1085.50 ▼10.9841.17 ▼3.42
Posts /wp-admin/edit.php2,119 ▲191.98 ▲0.0036.54 ▲0.5734.78 ▼2.83
Add New Post /wp-admin/post-new.php1,539 ▲1323.50 ▲0.43700.63 ▲17.6455.08 ▼4.12
Media Library /wp-admin/upload.php1,416 ▲194.13 ▼0.02111.61 ▲6.4547.95 ▲0.27

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • Zombie WordPress options were found after uninstall: 6 options
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please take a closer look at the following
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/chartlocal/chartlocal-tracking-settings.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found

Optimizations

Plugin configuration 90% 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
Please fix the following attributes:
  • Screenshots: Please add images for these screenshots: #1 (Chartlocal Traffic Detail Report.), #2 (Chartlocal tracking settings page.)
  • Tags: Too many tags (11 tag instead of maximum 10); only the first 5 tags are used in your directory listing
The official readme.txt might help

chartlocal/chartlocal-tracking.php 92% from 13 tests

"Chartlocal" version 1.0.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please take the time to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("chartlocal.php" instead of "chartlocal-tracking.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Success! There were no dangerous files found in this plugin113 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP32316113

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.25
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%
Functions9
▷ Named functions9100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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
No PNG images were found in this plugin