94% anymind-widget

Code Review | AnyMind Widget

WordPress plugin AnyMind Widget scored 94% from 54 tests.

About plugin

  • Plugin page: anymind-widget
  • Plugin version: 1.1
  • PHP compatiblity: 7.1.8+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9.5-4.9.5
  • WordPress version: 5.9.2
  • First release: Apr 24, 2018
  • Latest release: Nov 22, 2018
  • Number of updates: 7
  • Update frequency: every 30.3 days
  • Top authors: mbeltwski (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 585 total downloads

Benchmarks

Plugin footprint Passed 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: ▼0.01MB] [CPU: ▼295.92ms] Passed 4 tests

Server-side resources used by AnyMind Widget
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0261.10 ▲12.31
Dashboard /wp-admin3.43 ▲0.0233.52 ▼1.20
Posts /wp-admin/edit.php3.66 ▲0.0138.86 ▼5.26
Add New Post /wp-admin/post-new.php6.90 ▼0.0795.76 ▼1,174.77
Media Library /wp-admin/upload.php3.31 ▲0.0123.70 ▼2.45
AnyMind Widget /wp-admin/options-general.php?page=AnyMind-Widget3.2822.57

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 7 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

An overview of browser requirements for AnyMind Widget
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,867 ▲11316.69 ▲0.9417.06 ▲11.142.50 ▼0.02
Dashboard /wp-admin2,895 ▲346.16 ▼0.00115.26 ▼19.68161.73 ▼0.23
Posts /wp-admin/edit.php2,698 ▲133.24 ▲0.0165.06 ▼9.43141.54 ▼116.04
Add New Post /wp-admin/post-new.php1,666 ▲516.10 ▼0.12402.63 ▼31.73159.04 ▲6.41
Media Library /wp-admin/upload.php1,702 ▲45.51 ▼0.03141.10 ▲4.92204.20 ▲12.36
AnyMind Widget /wp-admin/options-general.php?page=AnyMind-Widget1,0652.4956.65127.81

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The plugin uninstalled successfully, without leaving any zombie files or tables

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
Good news, no errors were detected

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
Please take a closer look at the following
  • 3× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/anymind-widget/admin-panel.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/anymind-widget/anymind-plugin.php:21
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/anymind-widget/anymind-widget-id.php:11

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)
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
5 plugin tags: audio, widget, chat, video, sdk

anymind-widget/anymind-plugin.php 92% from 13 tests

The primary PHP file in "AnyMind Widget" version 1.1 is used by WordPress to initiate all plugin functionality
You should first fix the following items:
  • Main file name: The principal plugin file should be the same as the plugin slug ("anymind-widget.php" instead of "anymind-plugin.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Everything looks great! No dangerous files found in this plugin125 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP3172276
CSS16035
SVG10014

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.16
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

Using a strong compression for your PNG files is a great way to speed-up your plugin
PNG images were not found in this plugin