78% pro-reports-for-memberpress

Code Review | WPJ Reports for MemberPress

WordPress plugin WPJ Reports for MemberPress scored78%from 54 tests.

About plugin

  • Plugin page: pro-reports-for-m...
  • Plugin version: 1.5
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9-6.4.1
  • WordPress version: 6.3.1
  • First release: May 30, 2020
  • Latest release: Nov 29, 2023
  • Number of updates: 33
  • Update frequency: every 41.9 days
  • Top authors: treeflips (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

100+ active /2,770 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.00MB] [CPU: ▼9.88ms] Passed 4 tests

A check of server-side resources used by WPJ Reports for MemberPress
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0145.83 ▲2.02
Dashboard /wp-admin3.31 ▼0.0347.22 ▼19.71
Posts /wp-admin/edit.php3.36 ▲0.0144.22 ▼3.34
Add New Post /wp-admin/post-new.php5.89 ▲0.0181.04 ▼18.49
Media Library /wp-admin/upload.php3.24 ▲0.0135.63 ▲3.45

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for WPJ Reports for MemberPress
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,790 ▲4314.25 ▼0.261.65 ▼0.1038.32 ▼4.93
Dashboard /wp-admin2,198 ▲205.61 ▼0.1094.90 ▼24.1942.32 ▼2.29
Posts /wp-admin/edit.php2,103 ▲31.96 ▼0.1138.94 ▼2.2632.09 ▼1.68
Add New Post /wp-admin/post-new.php1,526 ▼023.57 ▲0.36600.31 ▼45.5456.85 ▼6.63
Media Library /wp-admin/upload.php1,400 ▼34.18 ▼0.0098.94 ▲0.9841.70 ▼0.29

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Good news, no errors were detected

SRP 0% 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
Almost there! Just fix the following items
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/pro-reports-for-memberpress/admin/controller.php
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/pro-reports-for-memberpress/admin/resources.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
4 plugin tags: reports, membership, addon, memberpress

pro-reports-for-memberpress/wpj-reports.php 77% from 13 tests

The main PHP script in "WPJ Reports for MemberPress" version 1.5 is automatically included on every request by WordPress
You should first fix the following items:
  • Main file name: The principal plugin file should be the same as the plugin slug ("pro-reports-for-memberpress.php" instead of "wpj-reports.php")
  • Description: Please keep the plugin description shorter than 140 characters (currently 230 characters long)
  • 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 check of programming languages and file extensions; no executable files are allowed
There were no executable files found in this plugin1,904 lines of code in 24 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript121291221,129
CSS58614564
PHP64756196
Markdown111015

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.16
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions7
▷ Named functions7100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
5 compressed PNG files occupy 0.00MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/css/DataTables-1.11.3/images/sort_desc.png0.15KB0.25KB0.00%
admin/css/DataTables-1.11.3/images/sort_both.png0.20KB0.29KB0.00%
admin/css/DataTables-1.11.3/images/sort_asc.png0.16KB0.25KB0.00%
admin/css/DataTables-1.11.3/images/sort_desc_disabled.png0.14KB0.25KB0.00%
admin/css/DataTables-1.11.3/images/sort_asc_disabled.png0.14KB0.25KB0.00%