83% obop-premium

Code Review | OBOP Premium

WordPress plugin OBOP Premium scored83%from 54 tests.

About plugin

  • Plugin page: obop-premium
  • Plugin version: 0.1
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Jun 2, 2016
  • Latest release: Jun 3, 2016
  • Number of updates: 3
  • Update frequency: every 0.7 days
  • Top authors: obop (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /477 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 successfully, without throwing any errors or notices

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

This is a short check of server-side resources used by OBOP Premium
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0341.22 ▼0.58
Dashboard /wp-admin3.35 ▲0.0449.45 ▼4.91
Posts /wp-admin/edit.php3.40 ▲0.0351.09 ▼10.00
Add New Post /wp-admin/post-new.php5.93 ▲0.0482.35 ▼13.09
Media Library /wp-admin/upload.php3.27 ▲0.0337.32 ▲2.45
OBOP Premium /wp-admin/options-general.php?page=obop-premium3.2330.94

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 10 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
db_upgraded
widget_recent-posts
widget_theysaidso_widget
can_compress_scripts
theysaidso_admin_options

Browser metrics Passed 4 tests

Checking browser requirements for OBOP Premium
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲3214.30 ▼0.071.83 ▲0.1543.79 ▲3.69
Dashboard /wp-admin2,199 ▲195.65 ▲0.0193.67 ▲5.5439.10 ▼2.51
Posts /wp-admin/edit.php2,107 ▲72.00 ▼0.0238.21 ▲0.5135.66 ▼0.66
Add New Post /wp-admin/post-new.php1,382 ▼14416.54 ▼7.01525.93 ▼155.0643.16 ▼9.48
Media Library /wp-admin/upload.php1,401 ▲44.18 ▼0.0696.15 ▼3.5844.03 ▲0.06
OBOP Premium /wp-admin/options-general.php?page=obop-premium7942.0624.4727.30

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
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
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/obop-premium/settings.php:14

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)
Everything seems fine on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 81% 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: Write the name of your plugin instead of "Plugin Name" on the first line ( === obop-premium === )
  • Screenshots: Add a description for screenshot #2 in obop-premium/assets to your readme.txt
  • Contributors: Plugin contributors not specified
The official readme.txt is a good inspiration

obop-premium/obop-premium.php Passed 13 tests

The main PHP file in "OBOP Premium" ver. 0.1 adds more information about the plugin and also serves as the entry point for this plugin
78 characters long description:
This plugins allow you to limit the access of some post to the OBOP users only

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
No dangerous file extensions were detected214 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP33128155
PO File14433
JavaScript16226

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity5.00
▷ Minimum class complexity2.00
▷ Maximum class complexity8.00
Average method complexity2.00
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods8
▷ Static methods337.50%
▷ Public methods787.50%
▷ Protected methods00.00%
▷ Private methods112.50%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants00.00%
▷ Class constants3100.00%
▷ Public constants3100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
3 PNG files occupy 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
img/read-more-en.png3.83KB4.09KB0.00%
img/icon.png1.28KB0.40KB▼ 68.32%
img/read-more-fr.png3.68KB3.98KB0.00%