84% ejabberd-account-tools

Code Review | Ejabberd Account Tools

WordPress plugin Ejabberd Account Tools scored84%from 54 tests.

About plugin

  • Plugin page: ejabberd-account-...
  • Plugin version: 2.7
  • PHP compatiblity: 8.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.9-5.9
  • WordPress version: 6.3.1
  • First release: Jun 6, 2015
  • Latest release: Feb 20, 2022
  • Number of updates: 448
  • Update frequency: every 5.5 days
  • Top authors: Beherit (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active /13,980 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Installer ran successfully

Server metrics [RAM: ▼0.01MB] [CPU: ▼5.95ms] Passed 4 tests

A check of server-side resources used by Ejabberd Account Tools
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0037.47 ▼7.27
Dashboard /wp-admin3.31 ▼0.0448.60 ▼16.73
Posts /wp-admin/edit.php3.36 ▲0.0053.24 ▲3.68
Add New Post /wp-admin/post-new.php5.89 ▲0.0097.39 ▲1.91
Media Library /wp-admin/upload.php3.23 ▲0.0037.32 ▼1.71

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 40 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-posts
widget_recent-comments
db_upgraded

Browser metrics Passed 4 tests

An overview of browser requirements for Ejabberd Account Tools
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.24 ▼0.971.64 ▼0.0739.19 ▼2.26
Dashboard /wp-admin2,206 ▲214.84 ▼0.06108.29 ▼8.2341.24 ▲0.35
Posts /wp-admin/edit.php2,089 ▼02.01 ▼0.0239.98 ▲0.6534.59 ▲1.03
Add New Post /wp-admin/post-new.php1,514 ▼517.53 ▼5.57657.18 ▼24.0656.46 ▼3.29
Media Library /wp-admin/upload.php1,391 ▲34.25 ▲0.07100.02 ▼5.3147.92 ▲1.22

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
The following issues need your attention
  • 2× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Interface 'Gregwar\\Captcha\\PhraseBuilderInterface' not found in wp-content/plugins/ejabberd-account-tools/third-party/Captcha/PhraseBuilder.php:10
    • > PHP Fatal error
      Uncaught Error: Interface 'Gregwar\\Captcha\\CaptchaBuilderInterface' not found in wp-content/plugins/ejabberd-account-tools/third-party/Captcha/CaptchaBuilder.php:14

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
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
3 plugin tags: ejabberd, jabber, xmpp

ejabberd-account-tools/ejabat.php 92% from 13 tests

The entry point to "Ejabberd Account Tools" version 2.7 is a PHP file that has certain tags in its header comment area
You should first fix the following items:
  • Main file name: Name the main plugin file the same as the plugin slug ("ejabberd-account-tools.php" instead of "ejabat.php")

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 plugin5,444 lines of code in 29 files:
LanguageFilesBlank linesComment linesLines of code
PHP193591,0874,022
JavaScript61862941,239
CSS41218183

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity19.67
▷ Minimum class complexity1.00
▷ Maximum class complexity57.00
Average method complexity2.87
▷ Minimum method complexity1.00
▷ Maximum method complexity20.00
Code structure
Namespaces2
Interfaces2
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods66
▷ Static methods57.58%
▷ Public methods4263.64%
▷ Protected methods2436.36%
▷ Private methods00.00%
Functions124
▷ Named functions9778.23%
▷ Anonymous functions2721.77%
Constants4
▷ Global constants4100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
No PNG files were detected