89% pubperf-analytics

Code Review | Pubperf Analytics

WordPress plugin Pubperf Analytics scored89%from 54 tests.

About plugin

  • Plugin page: pubperf-analytics
  • Plugin version: 2.0.1
  • PHP compatiblity: 5.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.2.2
  • WordPress version: 6.3.1
  • First release: Jul 20, 2020
  • Latest release: Oct 9, 2023
  • Number of updates: 9
  • Update frequency: every 130.6 days
  • Top authors: uniconsent (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /608 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
Install script ran successfully

Server metrics [RAM: ▼0.15MB] [CPU: ▼19.21ms] Passed 4 tests

This is a short check of server-side resources used by Pubperf Analytics
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.41 ▼0.0527.15 ▼9.75
Dashboard /wp-admin3.23 ▼0.0732.63 ▼17.96
Posts /wp-admin/edit.php3.30 ▼0.0632.68 ▼13.38
Add New Post /wp-admin/post-new.php5.47 ▼0.4267.12 ▼35.75
Media Library /wp-admin/upload.php3.24 ▲0.0129.19 ▼4.86

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 4 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
theysaidso_admin_options
db_upgraded
widget_recent-comments
widget_recent-posts
can_compress_scripts

Browser metrics Passed 4 tests

A check of browser resources used by Pubperf Analytics
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,838 ▲5214.17 ▼0.451.93 ▲0.0441.72 ▼2.60
Dashboard /wp-admin2,219 ▲425.56 ▼0.0985.19 ▼3.6841.03 ▼0.97
Posts /wp-admin/edit.php2,125 ▲251.95 ▼0.0234.87 ▼1.2136.44 ▲2.18
Add New Post /wp-admin/post-new.php1,552 ▲1522.91 ▲4.98651.20 ▲41.3167.25 ▲1.73
Media Library /wp-admin/upload.php1,421 ▲184.14 ▼0.04103.44 ▲7.3344.82 ▲2.23

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP Passed 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
Looking good! No server-side errors or output on direct access of PHP files

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 93% 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
8 plugin tags: stats, performance, web analytics, advertising, prebid...

pubperf-analytics/pubperf.php 85% from 13 tests

The principal PHP file in "Pubperf Analytics" v. 2.0.1 is loaded by WordPress automatically on each request
You should first fix the following items:
  • Description: The description should be shorter than 140 characters (currently 149 characters long)
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("pubperf-analytics.php" instead of "pubperf.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
There were no executable files found in this plugin181 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP13627173
SVG1008

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.17
Average class complexity6.00
▷ Minimum class complexity6.00
▷ Maximum class complexity6.00
Average method complexity1.45
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods11
▷ Static methods19.09%
▷ Public methods11100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
1 PNG file occupies 0.01MB with 0.01MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/logo-black.png10.78KB1.62KB▼ 85.01%