93% ax-gifs

Code Review | AX Gif

WordPress plugin AX Gif scored 93% from 54 tests.

About plugin

  • Plugin page: ax-gifs
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress version: 5.8.1
  • First release: Aug 9, 2019
  • Latest release: Nov 18, 2019
  • Number of updates: 7
  • Update frequency: every 14.7 days
  • Top authors: harrychd (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 452 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Install script ran successfully

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

A check of server-side resources used by AX Gif
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.85 ▲0.0136.26 ▲0.73
Dashboard /wp-admin3.07 ▲0.0144.63 ▲8.11
Posts /wp-admin/edit.php3.13 ▲0.0142.87 ▼1.79
Add New Post /wp-admin/post-new.php5.43 ▼0.0088.71 ▼560.85
Media Library /wp-admin/upload.php3.02 ▲0.0132.96 ▼1.17

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

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

Browser metrics Passed 4 tests

A check of browser resources used by AX Gif
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,790 ▲19416.21 ▲0.5512.67 ▲3.6953.28 ▲3.46
Dashboard /wp-admin2,969 ▲326.11 ▲0.02135.83 ▼16.46117.05 ▼2.89
Posts /wp-admin/edit.php2,741 ▲22.72 ▲0.0266.00 ▼0.9985.73 ▼1.87
Add New Post /wp-admin/post-new.php1,674 ▲418.69 ▼0.53348.27 ▼23.18114.71 ▲1.00
Media Library /wp-admin/upload.php1,815 ▲85.04 ▲0.00143.56 ▲2.60121.15 ▼3.02

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 | A shallow check that no server-side errors were triggered
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
The following issues need your attention
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/ax-gifs/axgif.php:24

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 81% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
These attributes need your attention:
  • Requires php: Invalid plugin version format
  • Contributors: Plugin contributors not specified
  • Requires at least: Invalid plugin version format
You can look at the official readme.txt

ax-gifs/axgif.php 92% from 13 tests

"AX Gif" version 1.1's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
It is important to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("ax-gifs.php" instead of "axgif.php")

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
Good job! No executable or dangerous file extensions detected592 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
Sass2415357
JavaScript2191113
SVG30177
PHP1161943
CSS2002

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.15
Average class complexity1.00
▷ Minimum class complexity1.00
▷ Maximum class complexity1.00
Average method complexity1.00
▷ Minimum method complexity1.00
▷ Maximum method complexity1.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods1
▷ Static methods00.00%
▷ Public methods1100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions6
▷ Named functions583.33%
▷ Anonymous functions116.67%
Constants0
▷ Global constants00.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