10% magcloud-widget

Code Review | Magcloud Widget

WordPress plugin Magcloud Widget scored10%from 54 tests.

About plugin

  • Plugin page: magcloud-widget
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-3.5.1
  • WordPress version: 6.3.1
  • First release: Apr 5, 2013
  • Latest release: Apr 8, 2013
  • Number of updates: 4
  • Update frequency: every 0.5 days
  • Top authors: GalalAly2 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /760 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Please fix the following installer errors
  • The plugin did not install without errors
    • > Deprecated in wp-content/plugins/magcloud-widget/magcloud_widget.php+135
    Function create_function() is deprecated

Server metrics [RAM: ▼1.92MB] [CPU: ▼59.43ms] Passed 4 tests

A check of server-side resources used by Magcloud Widget
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.08 ▼1.394.52 ▼35.70
Dashboard /wp-admin2.10 ▼1.255.75 ▼62.61
Posts /wp-admin/edit.php2.10 ▼1.265.53 ▼43.92
Add New Post /wp-admin/post-new.php2.10 ▼3.795.72 ▼95.49
Media Library /wp-admin/upload.php2.10 ▼1.136.15 ▼29.83

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 4 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-comments
theysaidso_admin_options
can_compress_scripts
widget_issue_cover_widget
widget_theysaidso_widget
db_upgraded
widget_recent-posts

Browser metrics Passed 4 tests

A check of browser resources used by Magcloud Widget
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,814 ▲5314.27 ▼0.452.28 ▲0.3137.81 ▼2.03
Dashboard /wp-admin2,195 ▲245.50 ▼0.1086.74 ▼3.5244.20 ▲2.63
Posts /wp-admin/edit.php2,100 ▼31.98 ▼0.0537.21 ▼3.4735.87 ▼3.63
Add New Post /wp-admin/post-new.php1,534 ▲618.23 ▼4.76630.51 ▼42.6372.55 ▲16.97
Media Library /wp-admin/upload.php1,397 ▼64.30 ▲0.0995.19 ▼4.9042.43 ▼6.67

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • The plugin did not uninstall gracefully
    • > Deprecated in wp-content/plugins/magcloud-widget/magcloud_widget.php+135
    Function create_function() is deprecated
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_issue_cover_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for 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 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
The following issues need your attention
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/magcloud-widget/magcloud_widget.php:10

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 issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
Attributes that require attention:
  • Donate link: Invalid URI found ("")
The official readme.txt might help

magcloud-widget/magcloud_widget.php 92% from 13 tests

The main PHP file in "Magcloud Widget" ver. 1.0 adds more information about the plugin and also serves as the entry point for this plugin
It is important to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("magcloud-widget.php" instead of "magcloud_widget.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Everything looks great! No dangerous files found in this plugin1,372 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP22052851,369
HTML1003

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.47
Average class complexity111.33
▷ Minimum class complexity7.00
▷ Maximum class complexity197.00
Average method complexity4.68
▷ Minimum method complexity1.00
▷ Maximum method complexity57.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods90
▷ Static methods22.22%
▷ Public methods7381.11%
▷ Protected methods1617.78%
▷ Private methods11.11%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants21
▷ Global constants21100.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
There are no PNG files in this plugin