74% ws-analytics

Code Review | WS Analytics

WordPress plugin WS Analytics scored74%from 54 tests.

About plugin

  • Plugin page: ws-analytics
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4.1-4.9.1
  • WordPress version: 6.3.1
  • First release: Nov 30, 2017
  • Latest release: Nov 30, 2017
  • Number of updates: 6
  • Update frequency: every 0.2 days
  • Top authors: webshouters (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /889 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▼0.94MB] [CPU: ▼38.43ms] Passed 4 tests

This is a short check of server-side resources used by WS Analytics
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0342.26 ▼1.39
Dashboard /wp-admin3.02 ▼0.3326.52 ▼40.10
Posts /wp-admin/edit.php3.02 ▼0.3427.18 ▼20.10
Add New Post /wp-admin/post-new.php3.02 ▼2.8723.53 ▼77.14
Media Library /wp-admin/upload.php3.02 ▼0.2124.60 ▼16.38
Analytics /wp-admin/tools.php?page=ws-analytics3.0228.24

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 4 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
db_upgraded
can_compress_scripts
widget_recent-posts
widget_recent-comments
widget_theysaidso_widget

Browser metrics Passed 4 tests

An overview of browser requirements for WS Analytics
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,818 ▲5714.27 ▼0.011.86 ▲0.0147.94 ▲7.97
Dashboard /wp-admin2,202 ▲255.61 ▼0.0895.34 ▼1.1342.62 ▲2.12
Posts /wp-admin/edit.php2,104 ▲41.99 ▼0.0340.59 ▲4.2736.59 ▲2.67
Add New Post /wp-admin/post-new.php1,536 ▲1023.15 ▲0.14658.52 ▼46.9852.87 ▼3.17
Media Library /wp-admin/upload.php1,407 ▲104.17 ▲0.0398.38 ▼16.6341.77 ▼7.65
Analytics /wp-admin/tools.php?page=ws-analytics8022.0225.6225.15

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • This plugin cannot be uninstalled
    • > User notice in wp-includes/functions.php+5905
    Function add_submenu_page was called incorrectly. The seventh parameter passed to add_submenu_page() should be numeric representing menu position. Please see Debugging in WordPress for more information. (This message was added in version 5.3.0.)
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Smoke test failed, please fix the following
    • > GET request to /wp-admin/tools.php?page=ws-analytics
    • > User notice in wp-includes/functions.php+5905
    Function add_submenu_page was called incorrectly. The seventh parameter passed to add_submenu_page() should be numeric representing menu position. Please see Debugging in WordPress for more information. (This message was added in version 5.3.0.)

SRP Passed 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions 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 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

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
8 plugin tags: tracking code, tracking, track, plugin, google...

ws-analytics/ws-analytics.php 92% from 13 tests

This is the main PHP file of "WS Analytics" version 1.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:
  • Requires at least: The required version number must match the one declared in readme.txt ("3.0" instead of "4.4.1")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
No dangerous file extensions were detected122 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP237102122

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.28
Average class complexity10.00
▷ Minimum class complexity10.00
▷ Maximum class complexity10.00
Average method complexity1.60
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods15
▷ Static methods16.67%
▷ Public methods1493.33%
▷ Protected methods00.00%
▷ Private methods16.67%
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

PNG files should be compressed to save space and minimize bandwidth usage
There were not PNG files found in your plugin