100% peachtree-analytics

Code Review | Peachtree Analytics

WordPress plugin Peachtree Analytics scored 100% from 54 tests.

About plugin

  • Plugin page: peachtree-analytics
  • Plugin version: 2.0.0
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5-5.2.4
  • WordPress version: 5.8.1
  • First release: Dec 23, 2019
  • Latest release: Dec 24, 2019
  • Number of updates: 3
  • Update frequency: every 0.3 days
  • Top authors: peachtreeanalytics (100%)

Code review

54 tests

User reviews

1 review

Install metrics

80+ active / 327 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.07MB] [CPU: ▼146.40ms] Passed 4 tests

Server-side resources used by Peachtree Analytics
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.89 ▲0.1740.26 ▲16.41
Dashboard /wp-admin3.12 ▲0.0646.78 ▲0.14
Posts /wp-admin/edit.php3.23 ▲0.1243.01 ▼6.47
Add New Post /wp-admin/post-new.php5.48 ▲0.0490.03 ▼578.97
Media Library /wp-admin/upload.php3.07 ▲0.0633.90 ▼0.31

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 16 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Peachtree Analytics: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,703 ▲10716.10 ▲0.677.54 ▼1.5250.05 ▼3.66
Dashboard /wp-admin2,973 ▲395.91 ▼0.00148.80 ▼8.64119.59 ▲1.71
Posts /wp-admin/edit.php2,739 ▼02.81 ▲0.1370.30 ▲8.8196.31 ▼2.81
Add New Post /wp-admin/post-new.php1,500 ▼18318.53 ▲0.25391.97 ▼4.93120.61 ▲3.18
Media Library /wp-admin/upload.php1,807 ▼35.03 ▲0.01166.88 ▼0.79126.72 ▲1.89

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Uninstall script ran successfully

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Good news, no errors were detected

SRP Passed 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
No output text or server-side errors detected on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
2 plugin tags: analytics, peachtree

peachtree-analytics/peachtree_analytics.php 92% from 13 tests

The main PHP file in "Peachtree Analytics" ver. 2.0.0 adds more information about the plugin and also serves as the entry point for this plugin
The following require your attention:
  • Main file name: Name the main plugin file the same as the plugin slug ("peachtree-analytics.php" instead of "peachtree_analytics.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
There were no executable files found in this plugin432 lines of code in 12 files:
LanguageFilesBlank linesComment linesLines of code
PHP1087187411
JSON20021

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.44
Average class complexity14.50
▷ Minimum class complexity1.00
▷ Maximum class complexity44.00
Average method complexity3.26
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces2
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes125.00%
Methods25
▷ Static methods416.00%
▷ Public methods2496.00%
▷ Protected methods00.00%
▷ Private methods14.00%
Functions6
▷ Named functions116.67%
▷ Anonymous functions583.33%
Constants1
▷ Global constants00.00%
▷ Class constants1100.00%
▷ Public constants1100.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