10% onepgr

Code Review | OnePgr Lobby

WordPress plugin OnePgr Lobby scored10%from 54 tests.

About plugin

  • Plugin page: onepgr
  • Plugin version: 1.6
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-5.2.2
  • WordPress version: 6.3.1
  • First release: Jan 7, 2017
  • Latest release: Feb 16, 2020
  • Number of updates: 21
  • Update frequency: every 54.0 days
  • Top authors: sthsan (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /794 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
It is recommended to fix the following installer errors
  • Install procedure had errors
    • > Notice in wp-content/plugins/onepgr/onepgr.php+44
    Undefined variable: new_options

Server metrics [RAM: ▲0.04MB] [CPU: ▼6.91ms] Passed 4 tests

Server-side resources used by OnePgr Lobby
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0337.35 ▼2.25
Dashboard /wp-admin3.34 ▲0.0444.79 ▼2.96
Posts /wp-admin/edit.php3.39 ▲0.0442.30 ▼2.89
Add New Post /wp-admin/post-new.php5.94 ▲0.0679.77 ▼19.55
Media Library /wp-admin/upload.php3.27 ▲0.0433.81 ▲0.89
Onepgr /wp-admin/options-general.php?page=onepgr_settings3.2129.70

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 11 new files
Database: no new tables, 7 new options
New WordPress options
widget_theysaidso_widget
db_upgraded
theysaidso_admin_options
widget_recent-comments
onepgr_options
can_compress_scripts
widget_recent-posts

Browser metrics Passed 4 tests

Checking browser requirements for OnePgr Lobby
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,247 ▲48614.46 ▼0.1219.31 ▲17.6038.59 ▼3.70
Dashboard /wp-admin2,213 ▲395.57 ▲0.0381.66 ▼3.6738.18 ▼6.14
Posts /wp-admin/edit.php2,121 ▲242.02 ▲0.0235.69 ▲0.0035.27 ▲1.05
Add New Post /wp-admin/post-new.php1,543 ▲1723.19 ▲0.15633.79 ▼62.4953.69 ▼6.02
Media Library /wp-admin/upload.php1,418 ▲214.21 ▲0.05103.86 ▲8.2044.17 ▼3.54
Onepgr /wp-admin/options-general.php?page=onepgr_settings9061.8227.4627.28

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
The following items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
These server-side errors were triggered
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=onepgr_settings
    • > Notice in wp-content/plugins/onepgr/onepgr.php+99
    Undefined index: onepgr_setup
    • > GET request to /wp-admin/options-general.php?page=onepgr_settings
    • > Notice in wp-content/plugins/onepgr/onepgr.php+102
    Undefined index: onepgr_code_snippet

SRP Passed 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
No output text or server-side errors detected on direct access of PHP files

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Attributes that need to be fixed:
  • Screenshots: Add descriptions for screenshots #2, #3, #4, #5 in onepgr/assets to your readme.txt
You can take inspiration from this readme.txt

onepgr/onepgr.php Passed 13 tests

This is the main PHP file of "OnePgr Lobby" version 1.6, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
71 characters long description:
Onepgr's powerful customer lobby now on your Wordpress powered website.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Success! There were no dangerous files found in this plugin224 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP38864213
JavaScript15011

PHP code Passed 2 tests

An overview of 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.47
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%
Functions15
▷ Named functions15100.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
4 PNG files occupy 0.05MB with 0.03MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/default.png5.79KB4.27KB▼ 26.26%
images/logo.png17.34KB2.73KB▼ 84.28%
1.0/images/default.png9.50KB4.45KB▼ 53.20%
1.0/images/logo.png17.34KB2.73KB▼ 84.28%