78% makestories-helper

Code Review | MakeStories (for Google Web Stories)

WordPress plugin MakeStories (for Google Web Stories) scored78%from 54 tests.

About plugin

  • Plugin page: makestories-helper
  • Plugin version: 2.8.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.2.2
  • WordPress version: 6.3.1
  • First release: Nov 30, 2018
  • Latest release: Jul 26, 2023
  • Number of updates: 58
  • Update frequency: every 29.8 days
  • Top authors: pressmate (100%)

Code review

54 tests

User reviews

28 reviews

Install metrics

4,000+ active /78,231 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
This plugin's installer ran successfully

Server metrics [RAM: ▼0.35MB] [CPU: ▼17.73ms] Passed 4 tests

A check of server-side resources used by MakeStories (for Google Web Stories)
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.80 ▲0.3432.32 ▼12.22
Dashboard /wp-admin3.64 ▲0.3057.00 ▼9.55
Posts /wp-admin/edit.php3.76 ▲0.4059.60 ▲9.67
Add New Post /wp-admin/post-new.php3.52 ▼2.3743.02 ▼58.78
Media Library /wp-admin/upload.php3.57 ▲0.3443.19 ▲9.64
Settings /wp-admin/admin.php?page=ms_settings3.5441.29
MakeStories /wp-admin/admin.php?page=makestories-editor3.5641.19

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 62 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-comments
widget_recent-posts
can_compress_scripts
theysaidso_admin_options
db_upgraded

Browser metrics Passed 4 tests

Checking browser requirements for MakeStories (for Google Web Stories)
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,982 ▲23614.01 ▼0.139.34 ▲7.5942.36 ▲3.67
Dashboard /wp-admin2,264 ▲764.90 ▼0.99105.19 ▼5.0839.32 ▼4.07
Posts /wp-admin/edit.php2,148 ▲592.01 ▼0.0336.35 ▼3.9435.48 ▼1.21
Add New Post /wp-admin/post-new.php6,221 ▲4,67819.01 ▲0.75912.02 ▲281.9338.30 ▼12.62
Media Library /wp-admin/upload.php1,443 ▲554.22 ▲0.01103.69 ▼2.3745.37 ▲1.47
Settings /wp-admin/admin.php?page=ms_settings1,0441.8127.5727.26
MakeStories /wp-admin/admin.php?page=makestories-editor2,53036.351,008.1771.78

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
You still need to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 0% 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
  • 5× PHP files output text when accessed directly:
    • > /wp-content/plugins/makestories-helper/templates/ms-single-masonry-post.php
    • > /wp-content/plugins/makestories-helper/templates/editor-head.php
    • > /wp-content/plugins/makestories-helper/templates/listing-story-masonry.php
    • > /wp-content/plugins/makestories-helper/ms-setting.php
    • > /wp-content/plugins/makestories-helper/templates/editor-footer.php
  • 38× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/makestories-helper/makestories.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/makestories-helper/shortcode.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/makestories-helper/basic-auth.php:31
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/makestories-helper/api/media.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_nonce_field() in wp-content/plugins/makestories-helper/slug-modal.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_get_current_user() in wp-content/plugins/makestories-helper/templates/ms-single-widget.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/makestories-helper/api/publish.php:2
    • > PHP Notice
      Undefined variable: permalink in wp-content/plugins/makestories-helper/templates/listing-story-masonry.php on line 17
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_reset_postdata() in wp-content/plugins/makestories-helper/templates/ms-post-by-category.php:21
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/makestories-helper/templates/editor.php:5

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
6 plugin tags: makestories, stories, amp, storytelling, web stories...

makestories-helper/makestories.php 85% from 13 tests

The main file in "MakeStories (for Google Web Stories)" v. 2.8.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
You should first fix the following items:
  • Main file name: The principal plugin file should be the same as the plugin slug ("makestories-helper.php" instead of "makestories.php")
  • Description: The description should be shorter than 140 characters (currently 177 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
No dangerous file extensions were detected6,777 lines of code in 49 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript6927902,713
PHP312772442,371
CSS4227601,234
Sass2275262
LESS1115152
SVG41037
Ruby1208

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions76
▷ Named functions7598.68%
▷ Anonymous functions11.32%
Constants24
▷ Global constants24100.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
4 compressed PNG files occupy 0.75MB
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/Slide.png382.59KB411.39KB0.00%
assets/js/tiny-mce/img/quote.png0.58KB0.65KB0.00%
assets/images/Slide.png382.59KB411.39KB0.00%
assets/images/border3.png0.12KB0.15KB0.00%