78% wp-labur

Code Review | Labur WordPress Plugin

WordPress plugin Labur WordPress Plugin scored78%from 54 tests.

About plugin

  • Plugin page: wp-labur
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7.3-5.5.3
  • WordPress version: 6.3.1
  • First release: Jun 7, 2017
  • Latest release: Dec 7, 2020
  • Number of updates: 9
  • Update frequency: every 142.5 days
  • Top authors: aldakur (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /697 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 gracefully, with no errors

Server metrics [RAM: ▼0.67MB] [CPU: ▼18.52ms] Passed 4 tests

This is a short check of server-side resources used by Labur WordPress Plugin
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0438.24 ▼6.11
Dashboard /wp-admin3.34 ▲0.0443.92 ▼5.20
Posts /wp-admin/edit.php3.31 ▼0.0540.11 ▼6.90
Add New Post /wp-admin/post-new.php3.18 ▼2.7135.79 ▼55.87
Media Library /wp-admin/upload.php3.27 ▲0.0335.75 ▲0.56
Labur /wp-admin/options-general.php?page=labur3.2129.65

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 17 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
can_compress_scripts
db_upgraded
widget_recent-posts
widget_recent-comments
theysaidso_admin_options

Browser metrics Passed 4 tests

Checking browser requirements for Labur WordPress Plugin
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲6914.46 ▼0.061.70 ▼0.4342.71 ▼9.28
Dashboard /wp-admin2,210 ▲215.81 ▲0.92101.24 ▼19.3840.80 ▼5.73
Posts /wp-admin/edit.php2,099 ▲72.00 ▼0.0834.23 ▼5.7633.70 ▼3.64
Add New Post /wp-admin/post-new.php6,475 ▲4,93723.34 ▲0.05850.63 ▲172.4261.50 ▲2.94
Media Library /wp-admin/upload.php1,395 ▲74.26 ▲0.04102.08 ▼1.3242.32 ▼0.83
Labur /wp-admin/options-general.php?page=labur6921.536.4320.24

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
These server-side errors were triggered
    • > GET request to /wp-admin/options-general.php?page=labur
    • > User deprecated in wp-includes/functions.php+5463
    Function screen_icon is deprecated since version 3.8.0 with no alternative available.
    • > GET request to /wp-admin/options-general.php?page=labur
    • > User deprecated in wp-includes/functions.php+5463
    Function get_screen_icon is deprecated since version 3.8.0 with no alternative available.
    • > GET request to /wp-admin/options-general.php?page=labur
    • > Error in wp-admin/includes/template.php+1801
    Uncaught ArgumentCountError: Too few arguments to function do_settings_fields(), 1 passed in wp-content/plugins/wp-labur/admin/settings-page.php on line 31 and exactly 2 expected in wp-admin/includes/template.php:1801
    Stack trace:
    #0 wp-content/plugins/wp-labur/admin/settings-page.php(31): do_settings_fields()
    #1 wp-includes/class-wp-hook.php(310): labur_plugin_options()
    #2 wp-includes/class-wp-hook.php(334): WP_Hook->apply_filters()
    #3 wp-includes/plugin.php(517): WP_Hook->do_action()
    #4 wp-admin/admin.php(259): do_action()
    #5 wp-admin/options-general.php(10): require_once('/var/www/wordpr...')
    #6 {main}
    thrown

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
Please take a closer look at the following
  • 6× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/wp-labur/admin/plugins-page.php
    • > /wp-content/plugins/wp-labur/labur.php
    • > /wp-content/plugins/wp-labur/admin/admin-all-posts-page.php
    • > /wp-content/plugins/wp-labur/admin/labur-metabox.php
    • > /wp-content/plugins/wp-labur/admin/settings-page.php
    • > /wp-content/plugins/wp-labur/admin/admin-menu.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser issues were found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
6 plugin tags: eus, labur, free-software, open-source, link-shortener...

wp-labur/labur.php 92% from 13 tests

This is the main PHP file of "Labur WordPress Plugin" version 1.0.1, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please take the time to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("wp-labur.php" instead of "labur.php")

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 plugin252 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
PHP86495148
PO File2242884
JavaScript12020

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.20
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%
Functions12
▷ Named functions12100.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
There were not PNG files found in your plugin