78% alchemist-ajax-upload

Code Review | Alchemist Ajax Upload

WordPress plugin Alchemist Ajax Upload scored78%from 54 tests.

About plugin

  • Plugin page: alchemist-ajax-up...
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-3.5.1
  • WordPress version: 6.3.1
  • First release: May 4, 2013
  • Latest release: May 11, 2013
  • Number of updates: 5
  • Update frequency: every 1.4 days
  • Top authors: tandubhai (100%)

Code review

54 tests

User reviews

6 reviews

Install metrics

20+ active /2,847 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.01MB] [CPU: ▼8.79ms] Passed 4 tests

A check of server-side resources used by Alchemist Ajax Upload
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0243.02 ▼0.17
Dashboard /wp-admin3.32 ▼0.0250.72 ▼17.67
Posts /wp-admin/edit.php3.37 ▲0.0249.35 ▼3.00
Add New Post /wp-admin/post-new.php5.90 ▲0.0288.01 ▼14.33
Media Library /wp-admin/upload.php3.25 ▲0.0242.38 ▲1.37

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 4 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-comments
can_compress_scripts
widget_recent-posts
theysaidso_admin_options
db_upgraded
widget_theysaidso_widget
aaiu-options

Browser metrics Passed 4 tests

A check of browser resources used by Alchemist Ajax Upload
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,831 ▲8513.21 ▼1.474.72 ▲2.4738.71 ▼5.05
Dashboard /wp-admin2,240 ▲464.84 ▼1.05101.31 ▼2.9242.76 ▼3.36
Posts /wp-admin/edit.php2,116 ▲162.06 ▲0.0236.87 ▼3.4637.41 ▼2.80
Add New Post /wp-admin/post-new.php1,558 ▲1023.45 ▲0.02658.08 ▼4.2556.24 ▼6.84
Media Library /wp-admin/upload.php1,413 ▲134.20 ▼0.07101.86 ▼13.4743.76 ▼5.19

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
  • This plugin does not fully uninstall, leaving 7 options in the database
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts
    • theysaidso_admin_options
    • aaiu-options
    • widget_recent-comments
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

SRP 0% 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× PHP files output text when accessed directly:
    • > /wp-content/plugins/alchemist-ajax-upload/html.php
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function trailingslashit() in wp-content/plugins/alchemist-ajax-upload/alchemist_ajax_upload.php:28

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
2 plugin tags: ajax upload, wp-ajax

alchemist-ajax-upload/alchemist_ajax_upload.php 85% from 13 tests

The main PHP file in "Alchemist Ajax Upload" ver. 1.1 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: It is recommended to name the main PHP file as the plugin slug ("alchemist-ajax-upload.php" instead of "alchemist_ajax_upload.php")
  • Description: The description should be shorter than 140 characters (currently 183 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Everything looks great! No dangerous files found in this plugin336 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP27025257
JavaScript124479

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.12
Average class complexity12.00
▷ Minimum class complexity12.00
▷ Maximum class complexity12.00
Average method complexity1.92
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods12
▷ Static methods00.00%
▷ Public methods12100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.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