10% magic-author-box

Code Review | Magic Author Box

WordPress plugin Magic Author Box scored10%from 54 tests.

About plugin

  • Plugin page: magic-author-box
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-6.1
  • WordPress version: 6.3.1
  • First release: Jul 17, 2020
  • Latest release: Feb 2, 2023
  • Number of updates: 5
  • Update frequency: every 186.0 days
  • Top authors: WeblineIndia (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /473 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Please fix the following installer errors
  • This plugin did not install gracefully
    • > User notice in wp-includes/functions.php+5905
    Function map_meta_cap was called incorrectly. The post type mabox_template is not registered, so it may not be reliable to check the capability edit_post against a post of that type. Please see Debugging in WordPress for more information. (This message was added in version 4.4.0.)

Server metrics [RAM: ▲0.14MB] [CPU: ▼3.76ms] Passed 4 tests

Analyzing server-side resources used by Magic Author Box
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0741.39 ▲2.47
Dashboard /wp-admin3.46 ▲0.1650.91 ▼2.31
Posts /wp-admin/edit.php3.55 ▲0.2051.31 ▲0.98
Add New Post /wp-admin/post-new.php6.05 ▲0.1685.78 ▼16.17
Media Library /wp-admin/upload.php3.38 ▲0.1639.86 ▲4.50
Add New /wp-admin/post-new.php?post_type=mabox_template3.7862.52
All Template /wp-admin/edit.php?post_type=mabox_template3.4849.68
Settings /wp-admin/edit.php?post_type=mabox_template&page=mabox-settings3.4041.57

Server storage [IO: ▲0.43MB] [DB: ▲0.01MB] Passed 3 tests

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 38 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-posts
db_upgraded
can_compress_scripts
theysaidso_admin_options
widget_theysaidso_widget
MABox_Settings
widget_recent-comments

Browser metrics Passed 4 tests

A check of browser resources used by Magic Author Box
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,834 ▲9913.28 ▼1.401.71 ▼0.0138.51 ▼2.01
Dashboard /wp-admin2,237 ▲1025.88 ▲0.22109.24 ▼12.4239.43 ▼5.76
Posts /wp-admin/edit.php2,123 ▲342.00 ▼0.0438.16 ▼3.7634.29 ▼1.94
Add New Post /wp-admin/post-new.php1,559 ▲2623.36 ▲0.27665.02 ▼3.6849.88 ▼3.37
Media Library /wp-admin/upload.php1,422 ▲314.24 ▼0.0395.12 ▼2.9042.15 ▼1.53
Add New /wp-admin/post-new.php?post_type=mabox_template11,7923.70177.4670.47
All Template /wp-admin/edit.php?post_type=mabox_template1,8542.0534.4328.31
Settings /wp-admin/edit.php?post_type=mabox_template&page=mabox-settings1,2564.5151.7224.65

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • The uninstall procedure has failed, leaving 7 options in the database
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts
    • MABox_Settings
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Almost there! Just fix the following items
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_url() in wp-content/plugins/magic-author-box/includes/templates/template-mabox.php:30

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 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
9 plugin tags: author social icons, author bio, author profile fields, profile fields, author profile...

magic-author-box/magic-author-box.php Passed 13 tests

Analyzing the main PHP file in "Magic Author Box" version 1.0.1
85 characters long description:
Magic Author Box display a responsive author box with author information on frontend.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
No dangerous file extensions were detected4,441 lines of code in 22 files:
LanguageFilesBlank linesComment linesLines of code
PHP175277903,476
CSS28224504
JavaScript315384461

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.49
Average class complexity38.00
▷ Minimum class complexity1.00
▷ Maximum class complexity145.00
Average method complexity7.00
▷ Minimum method complexity1.00
▷ Maximum method complexity48.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes12
▷ Abstract classes00.00%
▷ Concrete classes12100.00%
▷ Final classes00.00%
Methods74
▷ Static methods2027.03%
▷ Public methods6587.84%
▷ Protected methods00.00%
▷ Private methods912.16%
Functions7
▷ Named functions7100.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants5100.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
11 compressed PNG files occupy 0.02MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/css/images/ui-icons_444444_256x240.png3.19KB3.49KB0.00%
admin/css/images/ui-bg_glass_100_fdf5ce_1x400.png0.12KB0.16KB0.00%
admin/css/images/ui-bg_flat_0_aaaaaa_40x100.png0.08KB0.08KB0.00%
admin/css/images/ui-bg_glass_65_ffffff_1x400.png0.20KB0.09KB▼ 57.49%
admin/css/images/ui-icons_777777_256x240.png3.19KB3.49KB0.00%