84% narwhal-microblog

Code Review | Narwhal Microblog

WordPress plugin Narwhal Microblog scored84%from 54 tests.

About plugin

  • Plugin page: narwhal-microblog
  • Plugin version: 3.1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 6.0-6.3
  • WordPress version: 6.3.1
  • First release: Jun 14, 2019
  • Latest release: Aug 12, 2023
  • Number of updates: 37
  • Update frequency: every 41.1 days
  • Top authors: wilcosky (100%)

Code review

54 tests

User reviews

1 review

Install metrics

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

Server metrics [RAM: ▲0.02MB] [CPU: ▼4.04ms] Passed 4 tests

Server-side resources used by Narwhal Microblog
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0235.56 ▼4.92
Dashboard /wp-admin3.33 ▲0.0344.35 ▼4.64
Posts /wp-admin/edit.php3.39 ▲0.0345.58 ▼1.61
Add New Post /wp-admin/post-new.php5.91 ▲0.0283.64 ▼4.97
Media Library /wp-admin/upload.php3.26 ▲0.0233.68 ▼0.76

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 4 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_recent-comments
can_compress_scripts
db_upgraded
widget_theysaidso_widget
theysaidso_admin_options

Browser metrics Passed 4 tests

Narwhal Microblog: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,911 ▲16513.59 ▼0.848.28 ▲6.3539.04 ▼0.39
Dashboard /wp-admin2,200 ▲185.80 ▲0.89102.02 ▲1.3439.05 ▼2.65
Posts /wp-admin/edit.php2,089 ▼32.02 ▼0.0433.07 ▼8.1731.44 ▼5.31
Add New Post /wp-admin/post-new.php1,519 ▲523.21 ▲5.65668.25 ▲66.2854.32 ▼0.23
Media Library /wp-admin/upload.php1,391 ▲94.17 ▼0.03101.44 ▲4.6044.81 ▲3.25

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 6 options
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-posts
    • 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
Everything seems fine, however this is by no means an exhaustive test

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
Almost there! Just 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/narwhal-microblog/narwhal.php:23

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 errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
These attributes need your attention:
  • Tags: Please reduce the number of tags, currently 13 tag instead of maximum 10
Please take inspiration from this readme.txt

narwhal-microblog/narwhal.php 92% from 13 tests

The primary PHP file in "Narwhal Microblog" version 3.1.1 is used by WordPress to initiate all plugin functionality
Please make the necessary changes and fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("narwhal-microblog.php" instead of "narwhal.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
There were no executable files found in this plugin215 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP11928129
JavaScript1121961
CSS13025

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.43
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%
Functions7
▷ Named functions7100.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
There are no PNG files in this plugin