79% albnet-shortcodes

Code Review | Albnet Shortcodes

WordPress plugin Albnet Shortcodes scored79%from 54 tests.

About plugin

  • Plugin page: albnet-shortcodes
  • Plugin version: 1.4.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.0
  • WordPress version: 6.3.1
  • First release: Jan 6, 2019
  • Latest release: Jan 21, 2019
  • Number of updates: 13
  • Update frequency: every 1.2 days
  • Top authors: albreis (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /547 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Installer ran successfully

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

This is a short check of server-side resources used by Albnet Shortcodes
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0238.88 ▼1.75
Dashboard /wp-admin3.31 ▼0.0343.49 ▼18.97
Posts /wp-admin/edit.php3.36 ▲0.0141.42 ▼4.32
Add New Post /wp-admin/post-new.php5.89 ▲0.0180.09 ▼21.22
Media Library /wp-admin/upload.php3.24 ▲0.0135.62 ▲0.53

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

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

Browser metrics Passed 4 tests

Albnet Shortcodes: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,082 ▲33613.83 ▼0.8411.63 ▲9.9944.80 ▼2.10
Dashboard /wp-admin2,221 ▲304.86 ▼1.0497.37 ▼2.6039.18 ▼3.29
Posts /wp-admin/edit.php2,083 ▼62.00 ▲0.0334.47 ▼5.0432.29 ▼4.10
Add New Post /wp-admin/post-new.php1,552 ▲1918.62 ▼4.44604.34 ▼27.8150.15 ▼2.50
Media Library /wp-admin/upload.php1,400 ▲154.23 ▼0.0292.93 ▼12.1239.31 ▼7.66

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

SRP 0% 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
Almost there! Just fix the following items
  • 5× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/albnet-shortcodes/shortcode-horizontal.php
    • > /wp-content/plugins/albnet-shortcodes/albnet-shortcodes.php
    • > /wp-content/plugins/albnet-shortcodes/shortcode-archive.php
    • > /wp-content/plugins/albnet-shortcodes/shortcode-slideshow.php
    • > /wp-content/plugins/albnet-shortcodes/shortcode-card.php
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/albnet-shortcodes/settings/index.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/albnet-shortcodes/settings/init.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration Passed 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
2 plugin tags: albreis, uikit

albnet-shortcodes/albnet-shortcodes.php Passed 13 tests

The main file in "Albnet Shortcodes" v. 1.4.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
33 characters long description:
A lot of shortcodes to show posts

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
There were no executable files found in this plugin27,063 lines of code in 16 files:
LanguageFilesBlank linesComment linesLines of code
CSS5105,90618,051
JavaScript43,481588,648
PHP76996364

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.41
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%
Functions6
▷ Named functions350.00%
▷ Anonymous functions350.00%
Constants1
▷ Global constants1100.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
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
img/icon-128x128.png3.27KB1.23KB▼ 62.35%