79% apollo-bar

Code Review | Apollo Bar

WordPress plugin Apollo Bar scored79%from 54 tests.

About plugin

  • Plugin page: apollo-bar
  • Plugin version: 1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.2-3.5.1
  • WordPress version: 6.3.1
  • First release: Oct 25, 2012
  • Latest release: Mar 11, 2013
  • Number of updates: 20
  • Update frequency: every 6.9 days
  • Top authors: codee47 (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

20+ active /4,820 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
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.07MB] [CPU: ▼8.40ms] Passed 4 tests

This is a short check of server-side resources used by Apollo Bar
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0431.81 ▼8.98
Dashboard /wp-admin3.44 ▲0.0561.06 ▼2.54
Posts /wp-admin/edit.php3.55 ▲0.1653.40 ▲0.10
Add New Post /wp-admin/post-new.php6.02 ▲0.0990.13 ▼20.71
Media Library /wp-admin/upload.php3.36 ▲0.0936.15 ▼1.35
All items /wp-admin/edit.php?post_type=announcements3.4040.79
Apollo Bar /wp-admin/options-general.php?page=apollo-bar/includes/apollo-bar-options.php3.3132.20
Add New /wp-admin/post-new.php?post_type=announcements3.4951.90

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 22 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_recent-comments
widget_theysaidso_widget
can_compress_scripts
db_upgraded
theysaidso_admin_options

Browser metrics Passed 4 tests

Checking browser requirements for Apollo Bar
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,913 ▲15213.56 ▼0.809.41 ▲7.8142.39 ▲0.71
Dashboard /wp-admin2,222 ▲425.51 ▼0.1289.73 ▲3.1536.81 ▼12.08
Posts /wp-admin/edit.php2,130 ▲301.97 ▼0.0535.20 ▼4.8834.23 ▼4.74
Add New Post /wp-admin/post-new.php1,559 ▲3323.02 ▲0.06677.11 ▼19.1363.08 ▼10.43
Media Library /wp-admin/upload.php1,433 ▲364.20 ▲0.0498.35 ▼9.2344.30 ▼0.25
All items /wp-admin/edit.php?post_type=announcements1,1151.9030.9729.92
Apollo Bar /wp-admin/options-general.php?page=apollo-bar/includes/apollo-bar-options.php1,2672.5748.7331.72
Add New /wp-admin/post-new.php?post_type=announcements2,2537.78168.5962.98

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Please fix the following server-side errors
    • > GET request to /wp-admin/options-general.php?page=apollo-bar/includes/apollo-bar-options.php
    • > 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=apollo-bar/includes/apollo-bar-options.php
    • > User deprecated in wp-includes/functions.php+5463
    Function get_screen_icon is deprecated since version 3.8.0 with no alternative available.
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=apollo-bar/includes/apollo-bar-options.php
    • > Notice in wp-content/plugins/apollo-bar/includes/apollo-bar-options.php+72
    Trying to access array offset on value of type bool

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 fix the following items
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/apollo-bar/apollo-bar.php:31
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/apollo-bar/includes/apollo-bar-options.php:126

User-side errors Passed 1 test

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

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 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
6 plugin tags: announcements, notification bar, infobar, hellobar, bar...

apollo-bar/apollo-bar.php Passed 13 tests

The entry point to "Apollo Bar" version 1.2 is a PHP file that has certain tags in its header comment area
114 characters long description:
Apollo Bar is a simple announcements plugin that allows you to create colorful notification bars for your website.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
No dangerous file extensions were detected1,241 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
CSS248154485
PHP28055357
PO File3114117309
JavaScript4242190

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.24
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%
Functions18
▷ Named functions18100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
6 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/apollo-bar-big.png2.25KB1.11KB▼ 50.78%
images/apollo-bar-logo.png2.38KB0.65KB▼ 72.83%
images/apollo-bar-small.png1.96KB1.07KB▼ 45.59%
images/ui-icons_888888_256x240.png4.27KB4.11KB▼ 3.78%
images/noisy-texture.png9.15KB4.29KB▼ 53.05%