72% aesop-story-engine

Code Review | Aesop Story Engine

WordPress plugin Aesop Story Engine scored 72% from 54 tests.

About plugin

  • Plugin page: aesop-story-engine
  • Plugin version: 2.2.10
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-5.8.1
  • WordPress version: 5.9.2
  • First release: Feb 18, 2014
  • Latest release: Oct 22, 2021
  • Number of updates: 602
  • Update frequency: every 4.7 days
  • Top authors: hyunster (89.87%)nphaskins (10.13%)

Code review

54 tests

User reviews

24 reviews

Install metrics

3,000+ active / 233,496 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.84MB] [CPU: ▼290.00ms] Passed 4 tests

Server-side resources used by Aesop Story Engine
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /4.63 ▲1.1162.52 ▲10.91
Dashboard /wp-admin4.63 ▲1.2253.66 ▲17.32
Posts /wp-admin/edit.php5.29 ▲1.6557.72 ▲18.03
Add New Post /wp-admin/post-new.php7.07 ▲0.1066.78 ▼1,188.72
Media Library /wp-admin/upload.php4.22 ▲0.9230.86 ▲0.49
All Story Collections /wp-admin/edit.php?post_type=ai_story_collection5.0943.88
Customize /wp-admin/customize.php?return=%2Fwp-admin%2Fwp-api.php5.5353.09
New Story Collection /wp-admin/post-new.php?post_type=ai_story_collection7.0564.00
All Galleries /wp-admin/edit.php?post_type=ai_galleries5.0944.35
New Gallery /wp-admin/post-new.php?post_type=ai_galleries4.7353.82
Welcome to Aesop Story Engine /wp-admin/index.php?page=aesop-welcome-screen4.4937.03

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 252 new files
Database: no new tables, 3 new options
New WordPress options
widget_recent-comments
widget_recent-posts
ai_core_version

Browser metrics Passed 4 tests

This is an overview of browser requirements for Aesop Story Engine
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /4,445 ▲72318.56 ▲2.8716.66 ▲9.9821.82 ▲19.44
Dashboard /wp-admin3,393 ▲5388.02 ▲1.84156.85 ▲19.64169.78 ▲7.11
Posts /wp-admin/edit.php3,324 ▲6305.18 ▲1.9586.48 ▲22.83159.22 ▲18.40
Add New Post /wp-admin/post-new.php2,423 ▲71227.80 ▲6.09472.16 ▲16.74240.72 ▲82.20
Media Library /wp-admin/upload.php1,775 ▲775.54 ▼0.00107.46 ▼35.73200.08 ▲11.23
All Story Collections /wp-admin/edit.php?post_type=ai_story_collection1,9495.1985.03144.82
Customize /wp-admin/customize.php?return=%2Fwp-admin%2Fwp-api.php8,44222.42561.39191.84
New Story Collection /wp-admin/post-new.php?post_type=ai_story_collection9,91222.02501.85150.66
All Galleries /wp-admin/edit.php?post_type=ai_galleries1,9275.0483.22129.54
New Gallery /wp-admin/post-new.php?post_type=ai_galleries3,3187.37118.43168.48
Welcome to Aesop Story Engine /wp-admin/index.php?page=aesop-welcome-screen1,9925.0076.87135.75

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
These items require your attention
  • Zombie WordPress options detected upon uninstall: 2 options
    • widget_recent-comments
    • widget_recent-posts

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
These server-side errors were triggered
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/customize.php?return=%2Fwp-admin%2Fwp-api.php
    • > Notice in wp-includes/class-wp-customize-nav-menus.php+1152
    Trying to get property 'title' of non-object
  • 5 occurences, only the last one shown
    • > GET request to /wp-admin/customize.php?return=%2Fwp-admin%2Fwp-api.php
    • > Notice in wp-content/plugins/aesop-story-engine/public/includes/options.php+64
    Undefined variable: value
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=ai_story_collection
    • > User deprecated in wp-includes/functions.php+5691
    block_categories is deprecated since version 5.8.0! Use block_categories_all instead.

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following
  • 19× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/aesop-story-engine/admin/includes/components/component-collection.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/aesop-story-engine/public/includes/theme-helpers.php:21
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/aesop-story-engine/public/class-aesop-core.php:476
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/aesop-story-engine/public/includes/components/component-heading.php:155
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/aesop-story-engine/admin/includes/help.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/aesop-story-engine/admin/includes/components/component-gallery.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/aesop-story-engine/admin/includes/class.welcome.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/aesop-story-engine/admin/includes/notify.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/aesop-story-engine/public/includes/css.php:15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/aesop-story-engine/admin/includes/components/component-map.php:12

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Please fix the following user-side errors
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/customize.php?return=%2Fwp-admin%2Fwp-api.php
    • > Console-api (warning) in wp-includes/js/dist/blocks.min.js?ver=28d5b8f8805a22435cbdc51927067812+1:24203
    The block \"ase/image\" is registered with an invalid category \"aesop-story-engine\".
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/customize.php?return=%2Fwp-admin%2Fwp-api.php
    • > Console-api (warning) in wp-includes/js/dist/blocks.min.js?ver=28d5b8f8805a22435cbdc51927067812+1:24203
    The block \"ase/gallery\" is registered with an invalid category \"aesop-story-engine\".
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/customize.php?return=%2Fwp-admin%2Fwp-api.php
    • > Console-api (warning) in wp-includes/js/dist/blocks.min.js?ver=28d5b8f8805a22435cbdc51927067812+1:24203
    The block \"ase/audio\" is registered with an invalid category \"aesop-story-engine\".
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/customize.php?return=%2Fwp-admin%2Fwp-api.php
    • > Console-api (warning) in wp-includes/js/dist/blocks.min.js?ver=28d5b8f8805a22435cbdc51927067812+1:24203
    The block \"ase/quote\" is registered with an invalid category \"aesop-story-engine\".
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/customize.php?return=%2Fwp-admin%2Fwp-api.php
    • > Console-api (warning) in wp-includes/js/dist/blocks.min.js?ver=28d5b8f8805a22435cbdc51927067812+1:24203
    The block \"ase/map\" is registered with an invalid category \"aesop-story-engine\".
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/customize.php?return=%2Fwp-admin%2Fwp-api.php
    • > Console-api (warning) in wp-includes/js/dist/blocks.min.js?ver=28d5b8f8805a22435cbdc51927067812+1:24203
    The block \"ase/mapmarker\" is registered with an invalid category \"aesop-story-engine\".
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/customize.php?return=%2Fwp-admin%2Fwp-api.php
    • > Console-api (warning) in wp-includes/js/dist/blocks.min.js?ver=28d5b8f8805a22435cbdc51927067812+1:24203
    The block \"ase/character\" is registered with an invalid category \"aesop-story-engine\".
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/customize.php?return=%2Fwp-admin%2Fwp-api.php
    • > Console-api (warning) in wp-includes/js/dist/blocks.min.js?ver=28d5b8f8805a22435cbdc51927067812+1:24203
    The block \"ase/video\" is registered with an invalid category \"aesop-story-engine\".
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/customize.php?return=%2Fwp-admin%2Fwp-api.php
    • > Console-api (warning) in wp-includes/js/dist/blocks.min.js?ver=28d5b8f8805a22435cbdc51927067812+1:24203
    The block \"ase/document\" is registered with an invalid category \"aesop-story-engine\".
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/customize.php?return=%2Fwp-admin%2Fwp-api.php
    • > Console-api (warning) in wp-includes/js/dist/blocks.min.js?ver=28d5b8f8805a22435cbdc51927067812+1:24203
    The block \"ase/timeline\" is registered with an invalid category \"aesop-story-engine\".
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/customize.php?return=%2Fwp-admin%2Fwp-api.php
    • > Console-api (warning) in wp-includes/js/dist/blocks.min.js?ver=28d5b8f8805a22435cbdc51927067812+1:24203
    The block \"ase/content\" is registered with an invalid category \"aesop-story-engine\".
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/customize.php?return=%2Fwp-admin%2Fwp-api.php
    • > Console-api (warning) in wp-includes/js/dist/blocks.min.js?ver=28d5b8f8805a22435cbdc51927067812+1:24203
    The block \"ase/parallax\" is registered with an invalid category \"aesop-story-engine\".
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/customize.php?return=%2Fwp-admin%2Fwp-api.php
    • > Console-api (warning) in wp-includes/js/dist/blocks.min.js?ver=28d5b8f8805a22435cbdc51927067812+1:24203
    The block \"ase/chapter\" is registered with an invalid category \"aesop-story-engine\".
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/customize.php?return=%2Fwp-admin%2Fwp-api.php
    • > Console-api (warning) in wp-includes/js/dist/blocks.min.js?ver=28d5b8f8805a22435cbdc51927067812+1:24203
    The block \"ase/collection\" is registered with an invalid category \"aesop-story-engine\".
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=ai_galleries
    • > Network (severe)
    http://maps.googleapis.com/maps/api/mapsjs/gen_204?csp_test=true - Failed to load resource: the server responded with a status of 403 (Forbidden)

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
10 plugin tags: thumbnail gallery, shortcode, interactive, education, gallery...

aesop-story-engine/aesop-core.php 85% from 13 tests

The principal PHP file in "Aesop Story Engine" v. 2.2.10 is loaded by WordPress automatically on each request
It is important to fix the following:
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug
  • Main file name: The principal plugin file should be the same as the plugin slug ("aesop-story-engine.php" instead of "aesop-core.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Good job! No executable or dangerous file extensions detected85,719 lines of code in 178 files:
LanguageFilesBlank linesComment linesLines of code
PO File3719,45626,50853,282
JavaScript494,0394,89316,605
PHP361,7371,3297,026
LESS305383263,232
SVG2013,219
CSS24412352,355

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity22.50
▷ Minimum class complexity1.00
▷ Maximum class complexity111.00
Average method complexity4.09
▷ Minimum method complexity1.00
▷ Maximum method complexity33.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes20
▷ Abstract classes00.00%
▷ Concrete classes20100.00%
▷ Final classes00.00%
Methods139
▷ Static methods75.04%
▷ Public methods12892.09%
▷ Protected methods21.44%
▷ Private methods96.47%
Functions42
▷ Named functions4197.62%
▷ Anonymous functions12.38%
Constants4
▷ Global constants4100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
18 compressed PNG files occupy 0.05MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
public/assets/img/close.png0.27KB0.29KB0.00%
public/includes/libs/leaflet/images/marker-shadow.png0.78KB1.16KB0.00%
public/assets/img/aesop-lazy-holder.png8.77KB3.61KB▼ 58.79%
public/assets/img/grabbing.png0.11KB0.14KB0.00%
public/assets/img/prev.png1.33KB1.59KB0.00%