84% bainternet-user-ranks

Code Review | Bainternet User Ranks

WordPress plugin Bainternet User Ranks scored 84% from 54 tests.

About plugin

  • Plugin page: bainternet-user-r...
  • Plugin version: 1.5.2
  • PHP version: 7.4.16
  • WordPress compatibility: 2.9.2-4.7.0
  • WordPress version: 5.8.1
  • First release: Feb 13, 2011
  • Latest release: Dec 13, 2016
  • Number of updates: 23
  • Update frequency: every 92.6 days
  • Top authors: bainternet (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 6,556 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
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.08MB] [CPU: ▼145.03ms] Passed 4 tests

This is a short check of server-side resources used by Bainternet User Ranks
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.91 ▲0.1936.75 ▲14.34
Dashboard /wp-admin3.14 ▲0.0946.66 ▼5.52
Posts /wp-admin/edit.php3.19 ▲0.0948.31 ▲1.94
Add New Post /wp-admin/post-new.php5.50 ▲0.0783.20 ▼579.05
Media Library /wp-admin/upload.php3.09 ▲0.0839.19 ▲2.50
Bainternet User Ranks /wp-admin/options-general.php?page=ba_user_rank3.0528.81

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 3 new files
Database: no new tables, 1 new option
New WordPress options
baur

Browser metrics Passed 4 tests

An overview of browser requirements for Bainternet User Ranks
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,684 ▲8816.19 ▲0.669.77 ▲0.5649.74 ▼0.88
Dashboard /wp-admin2,978 ▲476.03 ▲0.13144.44 ▼4.40113.68 ▲1.10
Posts /wp-admin/edit.php2,741 ▲22.68 ▼0.0268.79 ▼5.9786.08 ▼10.14
Add New Post /wp-admin/post-new.php1,503 ▼18018.57 ▼0.04400.82 ▲14.32114.72 ▼1.27
Media Library /wp-admin/upload.php1,815 ▲55.01 ▼0.02157.27 ▼1.57125.55 ▼1.28
Bainternet User Ranks /wp-admin/options-general.php?page=ba_user_rank1,3082.1169.7091.42

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
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 1 option
    • baur

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 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please take a closer look at the following
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/bainternet-user-ranks/baur.php:26

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
10 plugin tags: forum like ranking, user publish rank, user publish ranks, user karma, post and comments ranking...

bainternet-user-ranks/baur.php 92% from 13 tests

The principal PHP file in "Bainternet User Ranks" v. 1.5.2 is loaded by WordPress automatically on each request
It is important to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("bainternet-user-ranks.php" instead of "baur.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Success! There were no dangerous files found in this plugin371 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP23666371

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity51.00
▷ Minimum class complexity51.00
▷ Maximum class complexity51.00
Average method complexity3.94
▷ Minimum method complexity1.00
▷ Maximum method complexity14.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods17
▷ Static methods00.00%
▷ Public methods17100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
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

Often times overlooked, PNG files can occupy unnecessary space in your plugin
PNG images were not found in this plugin