84% axp-bootstrap-gallery

Code Review | AXP Bootstrap Gallery

WordPress plugin AXP Bootstrap Gallery scored84%from 54 tests.

About plugin

  • Plugin page: axp-bootstrap-gal...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.6.0-4.7.0
  • WordPress version: 6.3.1
  • First release: Jan 1, 2017
  • Latest release: Jan 1, 2017
  • Number of updates: 2
  • Update frequency: N/A
  • Top authors: axpdev (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /798 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.07MB] [CPU: ▼12.11ms] Passed 4 tests

Analyzing server-side resources used by AXP Bootstrap Gallery
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0737.33 ▼0.57
Dashboard /wp-admin3.39 ▲0.0539.60 ▼20.24
Posts /wp-admin/edit.php3.44 ▲0.0945.81 ▲0.34
Add New Post /wp-admin/post-new.php5.97 ▲0.0976.25 ▼22.95
Media Library /wp-admin/upload.php3.32 ▲0.0931.81 ▼4.68
Bootstrap Gallery /wp-admin/options-general.php?page=axp-bootstrap-gallery3.2828.29

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 10 new files
Database: no new tables, 7 new options
New WordPress options
axp-bootstrap-gallery-fields
widget_recent-comments
can_compress_scripts
theysaidso_admin_options
widget_theysaidso_widget
db_upgraded
widget_recent-posts

Browser metrics Passed 4 tests

Checking browser requirements for AXP Bootstrap Gallery
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲3214.25 ▼0.371.63 ▲0.0336.31 ▼5.15
Dashboard /wp-admin2,199 ▲195.64 ▼0.0698.42 ▲8.7441.76 ▲3.40
Posts /wp-admin/edit.php2,104 ▲41.99 ▼0.0440.26 ▲1.4436.11 ▲1.98
Add New Post /wp-admin/post-new.php1,529 ▲323.26 ▼0.27672.78 ▼1.3770.03 ▲19.74
Media Library /wp-admin/upload.php1,404 ▲44.19 ▲0.0493.68 ▼7.4440.51 ▼5.73
Bootstrap Gallery /wp-admin/options-general.php?page=axp-bootstrap-gallery9762.0029.9938.82

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
  • Zombie WordPress options detected upon uninstall: 7 options
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts
    • axp-bootstrap-gallery-fields

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
The smoke test was a success, however most plugin functionality was not tested

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
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 register_activation_hook() in wp-content/plugins/axp-bootstrap-gallery/axp-bootstrap-gallery.php:38

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)
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
These attributes need your attention:
  • Screenshots: Screenshot #1 (Example gallery) image missing
  • Tags: You are using too many tags: 11 tag instead of maximum 10
The official readme.txt might help

axp-bootstrap-gallery/axp-bootstrap-gallery.php Passed 13 tests

The primary PHP file in "AXP Bootstrap Gallery" version 1.0.0 is used by WordPress to initiate all plugin functionality
37 characters long description:
Adds the markup Bootstrap for gallery

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
Success! There were no dangerous files found in this plugin451 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP25822365
PO File1333381
Markdown1105

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.24
Average class complexity22.00
▷ Minimum class complexity22.00
▷ Maximum class complexity22.00
Average method complexity3.33
▷ Minimum method complexity1.00
▷ Maximum method complexity17.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods9
▷ Static methods111.11%
▷ Public methods9100.00%
▷ Protected methods00.00%
▷ Private methods00.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

All PNG images should be compressed to minimize bandwidth usage for end users
1 PNG file occupies 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png19.71KB9.74KB▼ 50.57%