84% ecommerce-reports-exporter

Code Review | Ninjalytics Ecommerce Reports Exporter

WordPress plugin Ninjalytics Ecommerce Reports Exporter scored84%from 54 tests.

About plugin

  • Plugin page: ecommerce-reports...
  • Plugin version: 1.0.0
  • PHP compatiblity: 5.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.8.1
  • WordPress version: 6.3.1
  • First release: Sep 16, 2021
  • Latest release: Nov 10, 2021
  • Number of updates: 5
  • Update frequency: every 11.0 days
  • Top authors: annaqq (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /320 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Install script ran successfully

Server metrics [RAM: ▲0.03MB] [CPU: ▼6.80ms] Passed 4 tests

An overview of server-side resources used by Ninjalytics Ecommerce Reports Exporter
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0342.09 ▲0.52
Dashboard /wp-admin3.34 ▲0.0345.99 ▼5.05
Posts /wp-admin/edit.php3.39 ▲0.0346.96 ▼4.87
Add New Post /wp-admin/post-new.php5.92 ▲0.0390.06 ▼17.80
Media Library /wp-admin/upload.php3.26 ▲0.0335.74 ▲0.64
Ecommerce Reports Exporter /wp-admin/admin.php?page=ags-reporting-preset-exporter3.2433.88

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 15 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-comments
can_compress_scripts
theysaidso_admin_options
widget_recent-posts
widget_theysaidso_widget

Browser metrics Passed 4 tests

A check of browser resources used by Ninjalytics Ecommerce Reports Exporter
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲314.45 ▲0.091.72 ▼0.1736.93 ▼5.90
Dashboard /wp-admin2,198 ▲245.62 ▲0.0989.97 ▼6.4039.52 ▼5.19
Posts /wp-admin/edit.php2,100 ▲32.00 ▲0.0537.41 ▼2.5037.44 ▼1.68
Add New Post /wp-admin/post-new.php1,531 ▼523.12 ▲4.93711.69 ▲77.6160.66 ▼1.76
Media Library /wp-admin/upload.php1,397 ▼34.21 ▼0.00101.45 ▲4.2647.05 ▲2.34
Ecommerce Reports Exporter /wp-admin/admin.php?page=ags-reporting-preset-exporter8312.0122.7463.33

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Good news, no errors were detected

SRP 50% from 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
Almost there! Just fix the following items
  • 2× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/ecommerce-reports-exporter/ecommerce-reports-exporter.php:56
    • > PHP Fatal error
      Uncaught Error: Class 'AGSReportingPresetExporter' not found in wp-content/plugins/ecommerce-reports-exporter/includes/admin/pages/admin.php:1

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 93% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Attributes that need to be fixed: The official readme.txt is a good inspiration

ecommerce-reports-exporter/ecommerce-reports-exporter.php 92% from 13 tests

The main file in "Ninjalytics Ecommerce Reports Exporter" v. 1.0.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please take the time to 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 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
No dangerous file extensions were detected946 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
Sass694135420
CSS1912326
PHP24337184
JavaScript10015
SVG1001

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.45
Average class complexity24.00
▷ Minimum class complexity24.00
▷ Maximum class complexity24.00
Average method complexity3.25
▷ Minimum method complexity1.00
▷ Maximum method complexity15.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods10
▷ Static methods10100.00%
▷ Public methods550.00%
▷ Protected methods00.00%
▷ Private methods550.00%
Functions2
▷ Named functions00.00%
▷ Anonymous functions2100.00%
Constants1
▷ Global constants00.00%
▷ Class constants1100.00%
▷ Public constants1100.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
No PNG images were found in this plugin