73% elokenz-most-shared-articles-for-authors

Code Review | Elokenz - Author's Most Shared Articles

WordPress plugin Elokenz - Author's Most Shared Articles scored73%from 54 tests.

About plugin

  • Plugin page: elokenz-most-shar...
  • Plugin version: 2.0.4
  • PHP version: 7.4.16
  • WordPress compatibility: 3.1-3.8
  • WordPress version: 6.3.1
  • First release: Jul 22, 2014
  • Latest release: Sep 29, 2014
  • Number of updates: 28
  • Update frequency: every 2.5 days
  • Top authors: tanzaho (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

10+ active /1,731 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▼1.89MB] [CPU: ▼56.81ms] Passed 4 tests

This is a short check of server-side resources used by Elokenz - Author's Most Shared Articles
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.07 ▼1.405.06 ▼34.75
Dashboard /wp-admin2.13 ▼1.178.68 ▼54.82
Posts /wp-admin/edit.php2.13 ▼1.227.10 ▼44.36
Add New Post /wp-admin/post-new.php2.13 ▼3.767.90 ▼93.31
Media Library /wp-admin/upload.php2.13 ▼1.097.36 ▼27.13

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 7 new files
Database: no new tables, 7 new options
New WordPress options
widget_theysaidso_widget
widget_recent-comments
widget_recent-posts
db_upgraded
can_compress_scripts
widget_baw_elokenz_widget
theysaidso_admin_options

Browser metrics Passed 4 tests

An overview of browser requirements for Elokenz - Author's Most Shared Articles
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.15 ▼0.141.89 ▲0.1546.02 ▲3.30
Dashboard /wp-admin2,192 ▲155.55 ▼0.1186.77 ▼7.6136.78 ▼7.28
Posts /wp-admin/edit.php2,103 ▼01.97 ▼0.0236.99 ▼0.4535.54 ▲1.82
Add New Post /wp-admin/post-new.php1,526 ▼1123.28 ▲5.20672.32 ▲8.9859.93 ▼5.91
Media Library /wp-admin/upload.php1,400 ▼04.13 ▼0.0797.85 ▼10.5541.96 ▼1.59

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The following items require your attention
  • This plugin did not uninstall without warnings or errors
    • > User notice in wp-includes/functions.php+5905
    Function wp_register_style was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the elokenz handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • Zombie WordPress options detected upon uninstall: 7 options
    • widget_recent-comments
    • widget_baw_elokenz_widget
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget

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 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please take a closer look at the following
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/elokenz-most-shared-articles-for-authors/elokenz_widget.php:11

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
These attributes need your attention:
  • Tags: Too many tags (14 tag instead of maximum 10); only the first 5 tags are used in your directory listing
You can look at the official readme.txt

elokenz-most-shared-articles-for-authors/elokenz_widget.php 85% from 13 tests

This is the main PHP file of "Elokenz - Author's Most Shared Articles" version 2.0.4, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
The following require your attention:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("elokenz-most-shared-articles-for-authors.php" instead of "elokenz_widget.php")
  • Description: Keep the plugin description shorter than 140 characters (currently 253 characters long)

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
Good job! No executable or dangerous file extensions detected267 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP13017204
PO File1151843
CSS10017
Markdown1103

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.22
Average class complexity25.00
▷ Minimum class complexity25.00
▷ Maximum class complexity25.00
Average method complexity7.00
▷ Minimum method complexity1.00
▷ Maximum method complexity16.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
No PNG files were detected