90% c-web-analytics

Code Review | Web Analytics

WordPress plugin Web Analytics scored90%from 54 tests.

About plugin

  • Plugin page: c-web-analytics
  • Plugin version: 1.0.21
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-6.1
  • WordPress version: 6.3.1
  • First release: Jun 16, 2022
  • Latest release: Nov 24, 2022
  • Number of updates: 11
  • Update frequency: every 14.6 days
  • Top authors: bebjakub (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /652 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Install script ran successfully

Server metrics [RAM: ▲0.30MB] [CPU: ▼1.50ms] Passed 4 tests

Server-side resources used by Web Analytics
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.77 ▲0.3045.60 ▼9.11
Dashboard /wp-admin3.67 ▲0.3655.37 ▲2.76
Posts /wp-admin/edit.php3.71 ▲0.3555.50 ▼0.08
Add New Post /wp-admin/post-new.php6.18 ▲0.28100.43 ▲0.44
Media Library /wp-admin/upload.php3.50 ▲0.2740.05 ▲6.24
Cloudflare Web Analytics /wp-admin/options-general.php?page=c-web-analytics3.5040.76

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Web Analytics
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,016 ▲23018.48 ▲3.922.05 ▼0.4041.67 ▼17.58
Dashboard /wp-admin2,417 ▲2468.32 ▲2.67178.41 ▲88.2247.21 ▲6.40
Posts /wp-admin/edit.php2,284 ▲1843.51 ▲1.4751.03 ▲8.7632.34 ▼5.03
Add New Post /wp-admin/post-new.php6,438 ▲4,90723.97 ▲0.45882.20 ▲198.2536.51 ▼28.71
Media Library /wp-admin/upload.php1,424 ▲214.34 ▲0.0785.48 ▼19.3842.17 ▼5.99
Cloudflare Web Analytics /wp-admin/options-general.php?page=c-web-analytics1,0673.4650.5528.44

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • The uninstall procedure has failed, leaving 7 options in the database
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments
    • c-web-analytics_settings
    • theysaidso_admin_options
    • widget_recent-posts

Smoke tests Passed 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 Passed 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
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 just a short smoke test looking for browser issues
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
3 plugin tags: web, cloudflare, analytics

c-web-analytics/c-web-analytics.php 92% from 13 tests

The main PHP script in "Web Analytics" version 1.0.21 is automatically included on every request by WordPress
Please make the necessary changes and fix the following:
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Everything looks great! No dangerous files found in this plugin35,241 lines of code in 40 files:
LanguageFilesBlank linesComment linesLines of code
JSON60033,305
PHP153607901,551
TypeScript95343336
Sass25027
HTML231618
JavaScript2032
CSS36461
SVG1001

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.47
Average class complexity21.10
▷ Minimum class complexity1.00
▷ Maximum class complexity83.00
Average method complexity2.89
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces4
Interfaces0
Traits0
Classes10
▷ Abstract classes00.00%
▷ Concrete classes10100.00%
▷ Final classes110.00%
Methods96
▷ Static methods2829.17%
▷ Public methods8891.67%
▷ Protected methods00.00%
▷ Private methods88.33%
Functions13
▷ Named functions17.69%
▷ Anonymous functions1292.31%
Constants5
▷ Global constants5100.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
There are no PNG files in this plugin