84% nepirity-analytics

Code Review | Nepirity Analytics

WordPress plugin Nepirity Analytics scored84%from 54 tests.

About plugin

  • Plugin page: nepirity-analytics
  • Plugin version: 1.1.6
  • PHP version: 7.4.16
  • WordPress compatibility: 3.6-5.2
  • WordPress version: 6.3.1
  • First release: May 30, 2017
  • Latest release: May 29, 2019
  • Number of updates: 37
  • Update frequency: every 19.7 days
  • Top authors: nepirity (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /3,302 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.35MB] [CPU: ▼2.56ms] Passed 4 tests

Server-side resources used by Nepirity Analytics
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.62 ▲0.1645.31 ▲0.01
Dashboard /wp-admin3.72 ▲0.4252.91 ▼5.38
Posts /wp-admin/edit.php3.77 ▲0.4260.42 ▲7.91
Add New Post /wp-admin/post-new.php6.30 ▲0.4288.70 ▼11.69
Media Library /wp-admin/upload.php3.64 ▲0.4143.85 ▲6.83

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 81 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-comments
widget_theysaidso_widget
can_compress_scripts
db_upgraded
widget_recent-posts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Nepirity Analytics
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,805 ▲4414.23 ▼0.401.64 ▼0.2342.66 ▼2.27
Dashboard /wp-admin2,211 ▲345.52 ▼0.1488.88 ▼13.3538.70 ▼6.26
Posts /wp-admin/edit.php2,116 ▲162.02 ▲0.0238.80 ▲1.2435.35 ▲1.26
Add New Post /wp-admin/post-new.php1,539 ▲1122.95 ▼0.05701.23 ▲16.3150.42 ▼13.06
Media Library /wp-admin/upload.php1,416 ▲134.23 ▲0.0792.98 ▼14.1042.79 ▼7.78

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
The following issues need your attention
  • 8× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Class 'jsonrpc\\JsonRpcBase' not found in wp-content/plugins/nepirity-analytics/sdk/classes/account.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function NP() in wp-content/plugins/nepirity-analytics/templates/admin/settings/general.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function nepirity\\add_action() in wp-content/plugins/nepirity-analytics/modules/admin.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'jsonrpc\\JsonRpcBase' not found in wp-content/plugins/nepirity-analytics/sdk/classes/view.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'jsonrpc\\JsonRpcBase' not found in wp-content/plugins/nepirity-analytics/sdk/classes/plugin.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'JsonRPC\\Request\\RequestParser' not found in wp-content/plugins/nepirity-analytics/sdk/classes/libs/vendor/fguillot/json-rpc/src/JsonRPC/Request/BatchRequestParser.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'jsonrpc\\JsonRpcBase' not found in wp-content/plugins/nepirity-analytics/sdk/classes/google.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'jsonrpc\\JsonRpcBase' not found in wp-content/plugins/nepirity-analytics/sdk/classes/support.php:5

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
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 is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
3 plugin tags: google analytics, data analytics, analytics

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

"Nepirity Analytics" version 1.1.6's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
The following require your attention:
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug

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
No dangerous file extensions were detected26,225 lines of code in 63 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript73,7722,40115,630
CSS61,239577,100
PHP467871,3622,982
SVG100288
PO File16572174
JSON20051

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity9.36
▷ Minimum class complexity1.00
▷ Maximum class complexity57.00
Average method complexity2.19
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces8
Interfaces1
Traits0
Classes38
▷ Abstract classes12.63%
▷ Concrete classes3797.37%
▷ Final classes12.70%
Methods275
▷ Static methods4516.36%
▷ Public methods22381.09%
▷ Protected methods207.27%
▷ Private methods3211.64%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
Constants26
▷ Global constants519.23%
▷ Class constants2180.77%
▷ Public constants21100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
7 PNG files occupy 0.03MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
templates/css/images/ui-icons_777620_256x240.png4.44KB4.17KB▼ 6.02%
templates/css/images/ui-icons_777777_256x240.png6.83KB4.17KB▼ 38.92%
templates/css/images/ui-icons_ffffff_256x240.png6.15KB4.17KB▼ 32.13%
templates/img/select_graph_arrow.png0.17KB0.18KB0.00%
templates/css/images/ui-icons_555555_256x240.png6.82KB4.17KB▼ 38.82%