93% smartaccounts

Code Review | SmartAccounts

WordPress plugin SmartAccounts scored 93% from 54 tests.

About plugin

  • Plugin page: smartaccounts
  • Plugin version: 3.8.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.8.0-5.8.3
  • WordPress version: 5.8.1
  • First release: Dec 13, 2017
  • Latest release: Jan 17, 2022
  • Number of updates: 34
  • Update frequency: every 44.0 days
  • Top authors: marguspala (100%)

Code review

54 tests

User reviews

1 review

Install metrics

70+ active / 2,045 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▼0.00MB] [CPU: ▼145.19ms] Passed 4 tests

This is a short check of server-side resources used by SmartAccounts
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.84 ▲0.0027.75 ▲1.06
Dashboard /wp-admin3.06 ▼0.0037.22 ▼5.21
Posts /wp-admin/edit.php3.11 ▲0.0136.55 ▼1.35
Add New Post /wp-admin/post-new.php5.42 ▼0.0172.93 ▼571.82
Media Library /wp-admin/upload.php3.00 ▲0.0025.56 ▼2.38

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 16 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

A check of browser resources used by SmartAccounts
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,681 ▲8016.02 ▲0.017.18 ▲1.3790.99 ▲12.71
Dashboard /wp-admin2,943 ▲476.10 ▼0.06114.05 ▼15.78166.40 ▼8.50
Posts /wp-admin/edit.php2,755 ▲153.24 ▲0.0164.01 ▼2.62138.49 ▼2.43
Add New Post /wp-admin/post-new.php3,819 ▲11319.10 ▼0.04415.94 ▼3.67154.77 ▼16.70
Media Library /wp-admin/upload.php1,762 ▲105.50 ▼0.02143.79 ▲7.94185.76 ▼5.12

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The plugin uninstalled completely, with no zombie files or tables

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 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following items
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Async_Request' not found in wp-content/plugins/smartaccounts/wp-background-process.php:16

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser issues were found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Attributes that require attention:
  • Plugin Name: "Plugin Name" should be replaced with the name of your plugin on the first line ( === smartaccounts === )
  • Contributors: Contributors not specified
The official readme.txt is a good inspiration

smartaccounts/smartaccounts.php 92% from 13 tests

This is the main PHP file of "SmartAccounts" version 3.8.1, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
It is important to fix the following:
  • Requires at least: The required version number did not match the one declared in readme.txt ("4.8" instead of "4.8.0")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Everything looks great! No dangerous files found in this plugin16,449 lines of code in 15 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript51,4821,49714,911
PHP103133441,538

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.39
Average class complexity26.33
▷ Minimum class complexity4.00
▷ Maximum class complexity72.00
Average method complexity4.62
▷ Minimum method complexity1.00
▷ Maximum method complexity23.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes9
▷ Abstract classes222.22%
▷ Concrete classes777.78%
▷ Final classes00.00%
Methods65
▷ Static methods1218.46%
▷ Public methods4061.54%
▷ Protected methods1929.23%
▷ Private methods69.23%
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

Using a strong compression for your PNG files is a great way to speed-up your plugin
PNG images were not found in this plugin