78% plos-alm-widget

Code Review | PLOS ALM Widget

WordPress plugin PLOS ALM Widget scored78%from 54 tests.

About plugin

  • Plugin page: plos-alm-widget
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-3.4.2
  • WordPress version: 6.3.1
  • First release: Sep 25, 2012
  • Latest release: Sep 26, 2012
  • Number of updates: 9
  • Update frequency: every 0.1 days
  • Top authors: plosalm (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /845 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
The plugin installed gracefully, with no errors

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

This is a short check of server-side resources used by PLOS ALM Widget
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0638.70 ▲1.38
Dashboard /wp-admin3.38 ▲0.0746.85 ▼2.36
Posts /wp-admin/edit.php3.43 ▲0.0748.14 ▼3.77
Add New Post /wp-admin/post-new.php5.96 ▲0.0784.71 ▼11.83
Media Library /wp-admin/upload.php3.30 ▲0.0736.85 ▲4.63
ALM Widget settings /wp-admin/themes.php?page=alm_widget3.3829.99

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 3 new files
Database: no new tables, 7 new options
New WordPress options
theysaidso_admin_options
db_upgraded
widget_recent-posts
widget_alm_widget
widget_theysaidso_widget
can_compress_scripts
widget_recent-comments

Browser metrics Passed 4 tests

Checking browser requirements for PLOS ALM Widget
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,813 ▲6713.21 ▼1.194.89 ▲3.2139.98 ▼2.99
Dashboard /wp-admin2,222 ▲344.85 ▼0.0599.24 ▼9.1141.64 ▲1.35
Posts /wp-admin/edit.php2,102 ▲131.99 ▼0.0239.06 ▼3.0436.63 ▲1.17
Add New Post /wp-admin/post-new.php1,532 ▼123.15 ▲0.10666.34 ▲18.9859.08 ▲5.76
Media Library /wp-admin/upload.php1,401 ▲104.31 ▲0.11110.28 ▲13.2048.75 ▲4.07
ALM Widget settings /wp-admin/themes.php?page=alm_widget8222.0430.7332.77

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 7 options
    • widget_recent-posts
    • widget_alm_widget
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Please fix the following server-side errors
    • > GET request to /wp-admin/themes.php?page=alm_widget
    • > 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/themes.php?page=alm_widget
    • > User deprecated in wp-includes/functions.php+5463
    Function get_screen_icon is deprecated since version 3.8.0 with no alternative available.
    • > GET request to /wp-admin/themes.php?page=alm_widget
    • > Notice in wp-content/plugins/plos-alm-widget/almwidget.php+177
    Trying to access array offset on value of type bool
    • > GET request to /wp-admin/themes.php?page=alm_widget
    • > Notice in wp-content/plugins/plos-alm-widget/almwidget.php+188
    Undefined index: text_apikey

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 fix the following items
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/plos-alm-widget/almwidget.php:16

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)
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
7 plugin tags: articles, alm, metrics, plugin, widget...

plos-alm-widget/almwidget.php 85% from 13 tests

The entry point to "PLOS ALM Widget" version 1.0 is a PHP file that has certain tags in its header comment area
The following require your attention:
  • Description: Please don't use more than 140 characters for the plugin description (currently 162 characters long)
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("plos-alm-widget.php" instead of "almwidget.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
No dangerous file extensions were detected382 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP14836382

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity34.00
▷ Minimum class complexity34.00
▷ Maximum class complexity34.00
Average method complexity12.00
▷ Minimum method complexity1.00
▷ Maximum method complexity34.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods3
▷ Static methods00.00%
▷ Public methods3100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions10
▷ Named functions10100.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
No PNG images were found in this plugin