84% lubuntu-ribbon

Code Review | Lubuntu ribbon

WordPress plugin Lubuntu ribbon scored 84% from 54 tests.

About plugin

  • Plugin page: lubuntu-ribbon
  • Plugin version: 0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 2.6.0-4.1
  • WordPress version: 6.3.1
  • First release: Jan 30, 2015
  • Latest release: Jan 30, 2015
  • Number of updates: 4
  • Update frequency: N/A
  • Top authors: zpop (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 618 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.00MB] [CPU: ▼8.69ms] Passed 4 tests

A check of server-side resources used by Lubuntu ribbon
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0137.96 ▼4.57
Dashboard /wp-admin3.31 ▲0.0146.45 ▼3.94
Posts /wp-admin/edit.php3.36 ▲0.0042.75 ▼6.90
Add New Post /wp-admin/post-new.php5.89 ▲0.0083.70 ▼19.33
Media Library /wp-admin/upload.php3.23 ▲0.0036.14 ▼0.07

Server storage [IO: ▲0.09MB] [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: 5 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-posts
db_upgraded
widget_recent-comments
widget_theysaidso_widget
theysaidso_admin_options

Browser metrics Passed 4 tests

Lubuntu ribbon: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,802 ▲6714.74 ▲0.381.72 ▼0.0940.68 ▼3.66
Dashboard /wp-admin2,203 ▲125.84 ▲0.9698.19 ▼8.3539.45 ▼5.30
Posts /wp-admin/edit.php2,089 ▼02.04 ▲0.0435.51 ▼4.7631.96 ▼1.07
Add New Post /wp-admin/post-new.php1,519 ▲523.15 ▼0.28661.39 ▲31.6159.53 ▼2.41
Media Library /wp-admin/upload.php1,391 ▲64.28 ▲0.0396.47 ▼4.6743.07 ▼2.37

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though everything seems fine, this is not an exhaustive test

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
Almost there! Just fix the following items
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/lubuntu-ribbon/lubuntu-ribbon.php:25

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)
No browser issues were found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
Attributes that need to be fixed:
  • Screenshots: Screenshot #1 (Here's how the ribbon will appear on your website.) image not found
You can look at the official readme.txt

lubuntu-ribbon/lubuntu-ribbon.php Passed 13 tests

Analyzing the main PHP file in "Lubuntu ribbon" version 0.1
136 characters long description:
When activated, this plugin will put a Lubuntu ribbon on the top right corner of your website. This is a fork of Stop censorship plugin.

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
Good job! No executable or dangerous file extensions detected11 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP111311

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.40
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%
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

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
2 PNG files occupy 0.07MB with 0.04MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png66.43KB22.22KB▼ 66.55%
lubuntu-ribbon.png4.88KB2.44KB▼ 49.90%