84% ubuntu-ribbon

Code Review | Ubuntu ribbon

WordPress plugin Ubuntu ribbon scored84%from 54 tests.

About plugin

  • Plugin page: ubuntu-ribbon
  • Plugin version: 0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 2.6.0-3.9.2
  • WordPress version: 6.3.1
  • First release: Jun 21, 2012
  • Latest release: Jan 30, 2015
  • Number of updates: 14
  • Update frequency: every 68.1 days
  • Top authors: zpop (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,246 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
This plugin's installer ran successfully

Server metrics [RAM: ▲0.00MB] [CPU: ▼1.50ms] Passed 4 tests

An overview of server-side resources used by Ubuntu ribbon
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0037.02 ▼3.47
Dashboard /wp-admin3.31 ▲0.0149.62 ▼0.13
Posts /wp-admin/edit.php3.36 ▲0.0049.71 ▲0.32
Add New Post /wp-admin/post-new.php5.89 ▲0.0086.27 ▼2.71
Media Library /wp-admin/upload.php3.23 ▲0.0037.77 ▲1.13

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 5 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
can_compress_scripts
widget_recent-comments
widget_theysaidso_widget
widget_recent-posts
theysaidso_admin_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Ubuntu ribbon
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,791 ▲3014.62 ▲0.351.71 ▲0.0340.87 ▼0.74
Dashboard /wp-admin2,198 ▲245.62 ▲0.0988.15 ▼11.5938.65 ▼7.60
Posts /wp-admin/edit.php2,100 ▼02.00 ▼0.1235.59 ▼2.0431.32 ▼5.57
Add New Post /wp-admin/post-new.php1,526 ▼823.41 ▲5.22723.78 ▲81.7062.35 ▼3.84
Media Library /wp-admin/upload.php1,397 ▼34.20 ▼0.08103.75 ▼6.1148.01 ▲2.73

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 were found after uninstall: 6 options
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts

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)
The smoke test was a success, however most plugin functionality was not tested

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 fix the following items
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/ubuntu-ribbon/ubuntu-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)
Everything seems fine on the user side

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
These attributes need your attention:
  • Screenshots: Screenshot #1 (Here's how the ribbon will appear on your website.) image required
The official readme.txt is a good inspiration

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

The main PHP file in "Ubuntu ribbon" ver. 0.1 adds more information about the plugin and also serves as the entry point for this plugin
135 characters long description:
When activated, this plugin will put a Ubuntu 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 | Executable files are considered dangerous and should not be included with any WordPress plugin
Success! There were no dangerous files found in this plugin11 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP111311

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Everything seems fine, there were no complexity issues found
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

PNG files should be compressed to save space and minimize bandwidth usage
2 PNG files occupy 0.06MB with 0.03MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
ubuntu-ribbon.png3.15KB1.95KB▼ 38.06%
screenshot-1.png56.78KB21.88KB▼ 61.46%