94% ar-magic

Code Review | AR Magic

WordPress plugin AR Magic scored 94% from 54 tests.

About plugin

  • Plugin page: ar-magic
  • Plugin version: 1.4
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.0
  • WordPress version: 5.8.1
  • First release: May 9, 2014
  • Latest release: Sep 4, 2014
  • Number of updates: 14
  • Update frequency: every 8.6 days
  • Top authors: BZ9 (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active / 1,219 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▼0.08MB] [CPU: ▼158.88ms] Passed 4 tests

Server-side resources used by AR Magic
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.90 ▲0.0636.43 ▲9.74
Dashboard /wp-admin3.05 ▼0.0122.33 ▼21.02
Posts /wp-admin/edit.php3.10 ▼0.0023.63 ▼12.57
Add New Post /wp-admin/post-new.php5.07 ▼0.3758.72 ▼597.60
Media Library /wp-admin/upload.php3.06 ▲0.0521.45 ▼4.31
Instructions /wp-admin/edit.php?post_type=ar_magic&page=ar_magic3.0721.11
Account Management /wp-admin/edit.php?post_type=ar_magic&page=ar_magic_account3.0734.74
Add Responder /wp-admin/post-new.php?post_type=ar_magic3.1444.60
Saved Responders /wp-admin/edit.php?post_type=ar_magic3.1428.34

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

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

Browser metrics Passed 4 tests

Checking browser requirements for AR Magic
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,716 ▲11515.92 ▲0.194.84 ▼1.9673.63 ▼4.98
Dashboard /wp-admin2,976 ▲806.13 ▼0.09117.18 ▼11.17202.90 ▲33.90
Posts /wp-admin/edit.php2,789 ▲493.14 ▼0.0964.20 ▼1.41132.37 ▼5.70
Add New Post /wp-admin/post-new.php2,523 ▼1,21816.71 ▼1.99398.87 ▼69.18190.02 ▲25.49
Media Library /wp-admin/upload.php1,794 ▲425.52 ▼0.01126.98 ▼16.26200.29 ▲19.81
Instructions /wp-admin/edit.php?post_type=ar_magic&page=ar_magic3,2627.03281.10170.52
Account Management /wp-admin/edit.php?post_type=ar_magic&page=ar_magic_account1,0902.3354.62115.10
Add Responder /wp-admin/post-new.php?post_type=ar_magic2,0083.9977.17155.30
Saved Responders /wp-admin/edit.php?post_type=ar_magic1,4883.0763.57118.91

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
This plugin's uninstaller ran successfully

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
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
The following issues need your attention
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/ar-magic/ar-magic.php:46
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Query' not found in wp-content/plugins/ar-magic/form.php:11

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Attributes that need to be fixed:
  • Screenshots: Screenshot #1 (AR Magic application example) image required
You can take inspiration from this readme.txt

ar-magic/ar-magic.php Passed 13 tests

The main PHP script in "AR Magic" version 1.4 is automatically included on every request by WordPress
63 characters long description:
BZ9, Aweber, Getresponse and Mailchimp autoresponder management

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
There were no executable files found in this plugin524 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP288118471
JavaScript11033
CSS15020

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity45.00
▷ Minimum class complexity45.00
▷ Maximum class complexity45.00
Average method complexity2.76
▷ Minimum method complexity1.00
▷ Maximum method complexity12.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods25
▷ Static methods00.00%
▷ Public methods2288.00%
▷ Protected methods00.00%
▷ Private methods312.00%
Functions0
▷ Named functions00.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
7 PNG files occupy 0.08MB with 0.03MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/arMagic_Open.png7.71KB4.53KB▼ 41.28%
images/arMagic_logo16.png1.15KB0.96KB▼ 16.45%
images/arMagic_Help.png4.78KB3.74KB▼ 21.71%
js/arMagic_logo128.png23.74KB8.04KB▼ 66.12%
screenshot-1.png33.36KB17.54KB▼ 47.40%