72% aesop-story-engine

Code Review | Aesop Story Engine

WordPress plugin Aesop Story Engine scored72%from 54 tests.

About plugin

  • Plugin page: aesop-story-engine
  • Plugin version: 2.3.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-6.1.0
  • WordPress version: 6.3.1
  • First release: Feb 18, 2014
  • Latest release: Dec 24, 2022
  • Number of updates: 617
  • Update frequency: every 5.2 days
  • Top authors: hyunster (90.11%)nphaskins (9.89%)

Code review

54 tests

User reviews

24 reviews

Install metrics

2,000+ active /245,141 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
Install script ran successfully

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

A check of server-side resources used by Aesop Story Engine
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.63 ▲0.1756.41 ▲18.33
Dashboard /wp-admin3.72 ▲0.4162.04 ▲11.98
Posts /wp-admin/edit.php3.81 ▲0.4558.35 ▲8.75
Add New Post /wp-admin/post-new.php5.11 ▼0.7854.92 ▼39.92
Media Library /wp-admin/upload.php3.37 ▲0.1440.22 ▲5.15
New Story Collection /wp-admin/post-new.php?post_type=ai_story_collection5.1051.07
Welcome to Aesop Story Engine /wp-admin/index.php?page=aesop-welcome-screen3.6145.53
New Gallery /wp-admin/post-new.php?post_type=ai_galleries3.7154.27
All Story Collections /wp-admin/edit.php?post_type=ai_story_collection3.7050.71
All Galleries /wp-admin/edit.php?post_type=ai_galleries3.7046.73

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 252 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-posts
ai_core_version
db_upgraded
theysaidso_admin_options
can_compress_scripts
widget_recent-comments
widget_theysaidso_widget

Browser metrics Passed 4 tests

Aesop Story Engine: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,399 ▲63815.98 ▲1.7013.26 ▲11.5047.25 ▲4.57
Dashboard /wp-admin2,574 ▲3976.75 ▲1.17116.15 ▲10.3296.54 ▲51.48
Posts /wp-admin/edit.php2,577 ▲4773.68 ▲1.7354.63 ▲18.3876.53 ▲38.14
Add New Post /wp-admin/post-new.php6,810 ▲5,28422.47 ▼1.13974.55 ▲285.7064.93 ▲11.20
Media Library /wp-admin/upload.php1,457 ▲604.17 ▼0.0380.51 ▼18.9572.69 ▲27.93
New Story Collection /wp-admin/post-new.php?post_type=ai_story_collection6,43221.18891.2833.27
Welcome to Aesop Story Engine /wp-admin/index.php?page=aesop-welcome-screen1,6053.6044.8167.28
New Gallery /wp-admin/post-new.php?post_type=ai_galleries2,4975.9680.2299.14
All Story Collections /wp-admin/edit.php?post_type=ai_story_collection1,5333.4553.1080.35
All Galleries /wp-admin/edit.php?post_type=ai_galleries1,4983.5150.6272.33

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
Please fix the following items
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Please fix the following server-side errors
  • 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+5828
    Hook block_categories is deprecated since version 5.8.0! Use block_categories_all instead.

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Almost there! Just fix the following items
  • 19× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/aesop-story-engine/public/includes/components/component-map.php:132
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/aesop-story-engine/admin/includes/components/component-chapter.php:10
    • > 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_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_filter() in wp-content/plugins/aesop-story-engine/public/includes/browserclasses.php:12
    • > 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/includes/components/component-timeline.php:53
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/aesop-story-engine/public/includes/options.php:248
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/aesop-story-engine/public/includes/components/component-gallery.php:14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/aesop-story-engine/public/includes/css.php:15

User-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Please fix the following browser errors
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=ai_galleries
    • > Console-api (warning) in unknown
    http://maps.googleapis.com/maps/api/js?libraries=places&sensor=false&key=AIzaSyDguxUeZr9LUPe9ImgYwXPTqPwQbsUFAJo&ver=6.3.1 235:51 "Google Maps JavaScript API has been loaded directly without a callback. This is not supported and can lead to race conditions and suboptimal performance. For supported loading patterns please see https://goo.gle/js-api-loading"

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
10 plugin tags: aesop, education, parallax, story, gallery...

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

This is the main PHP file of "Aesop Story Engine" version 2.3.2, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
The following require your attention:
  • 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: Please rename the main PHP file in this plugin to 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 | A short check of programming languages and file extensions; no executable files are allowed
Success! There were no dangerous files found in this plugin85,734 lines of code in 178 files:
LanguageFilesBlank linesComment linesLines of code
PO File3719,45626,50853,282
JavaScript494,0384,89416,606
PHP361,7371,3297,026
LESS305383263,233
SVG2013,219
CSS24415362,368

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
There were no cyclomatic complexity issued detected
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

Using a strong compression for your PNG files is a great way to speed-up your plugin
18 PNG files occupy 0.05MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
public/includes/libs/leaflet/images/marker-icon-2x.png3.94KB2.53KB▼ 35.71%
public/assets/img/prev.png1.33KB1.59KB0.00%
admin/assets/img/aesop-gallery-layout-sprite.png4.98KB1.74KB▼ 65.05%
public/assets/img/close.png0.27KB0.29KB0.00%
admin/assets/img/icon.png0.37KB0.29KB▼ 21.22%