84% azores-gov-banner

Code Review | Azores Gov Banner

WordPress plugin Azores Gov Banner scored84%from 54 tests.

About plugin

  • Plugin page: azores-gov-banner
  • Plugin version: 3.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.8.0-4.9.4
  • WordPress version: 6.3.1
  • First release: Nov 4, 2017
  • Latest release: Sep 11, 2018
  • Number of updates: 21
  • Update frequency: every 14.9 days
  • Top authors: luisfbmelo (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /835 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
This plugin's installer ran successfully

Server metrics [RAM: ▼0.01MB] [CPU: ▼11.13ms] Passed 4 tests

Server-side resources used by Azores Gov Banner
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0033.10 ▼5.25
Dashboard /wp-admin3.31 ▼0.0442.09 ▼14.23
Posts /wp-admin/edit.php3.36 ▲0.0043.52 ▼0.31
Add New Post /wp-admin/post-new.php5.89 ▲0.0078.31 ▼21.75
Media Library /wp-admin/upload.php3.23 ▲0.0030.76 ▼3.27

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 5 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-posts
widget_recent-comments
theysaidso_admin_options
widget_theysaidso_widget
can_compress_scripts

Browser metrics Passed 4 tests

Checking browser requirements for Azores Gov Banner
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,881 ▲13513.26 ▼1.166.96 ▲5.2338.75 ▼7.22
Dashboard /wp-admin2,197 ▲65.83 ▼0.05102.54 ▲1.9640.96 ▼1.13
Posts /wp-admin/edit.php2,089 ▼02.02 ▲0.0233.44 ▼10.9729.67 ▼5.41
Add New Post /wp-admin/post-new.php1,536 ▲823.24 ▲4.67663.02 ▲45.6951.79 ▼1.82
Media Library /wp-admin/upload.php1,382 ▼64.20 ▼0.0396.48 ▼1.0243.51 ▲1.16

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 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
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 plugin_dir_path() in wp-content/plugins/azores-gov-banner/gov_banner.php:10

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
3 plugin tags: azores, government, banner

azores-gov-banner/gov_banner.php 92% from 13 tests

Analyzing the main PHP file in "Azores Gov Banner" version 3.0
The following require your attention:
  • Main file name: The principal plugin file should be the same as the plugin slug ("azores-gov-banner.php" instead of "gov_banner.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
No dangerous file extensions were detected44 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP181124
CSS13020

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.00
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%
Functions3
▷ Named functions3100.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
1 compressed PNG file occupies 0.00MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/img/gov_acores_banner.png2.23KB2.07KB▼ 7.34%