84% story-lines

Code Review | Story Lines

WordPress plugin Story Lines scored84%from 54 tests.

About plugin

  • Plugin page: story-lines
  • Plugin version: 2.1
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.9-6.2
  • WordPress version: 6.3.1
  • First release: Dec 31, 2015
  • Latest release: Feb 28, 2023
  • Number of updates: 25
  • Update frequency: every 104.6 days
  • Top authors: ArenaPigskin (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /3,596 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.06MB] [CPU: ▼14.04ms] Passed 4 tests

This is a short check of server-side resources used by Story Lines
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.62 ▲0.1539.72 ▼7.59
Dashboard /wp-admin3.33 ▲0.0333.06 ▼15.35
Posts /wp-admin/edit.php3.40 ▲0.0435.08 ▼9.91
Add New Post /wp-admin/post-new.php5.93 ▲0.0476.44 ▼23.30
Media Library /wp-admin/upload.php3.34 ▲0.1134.70 ▼0.10

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 47 new files
Database: no new tables, 7 new options
New WordPress options
db_upgraded
widget_recent-comments
widget_recent-posts
widget_theysaidso_widget
can_compress_scripts
widget_story_lines_widget
theysaidso_admin_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Story Lines
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,805 ▲5913.20 ▼1.101.57 ▼0.2341.16 ▼5.36
Dashboard /wp-admin2,206 ▲215.91 ▲1.07104.94 ▼4.2238.71 ▼6.17
Posts /wp-admin/edit.php2,093 ▲42.04 ▼0.0138.84 ▼1.3633.44 ▼1.15
Add New Post /wp-admin/post-new.php6,545 ▲5,02627.79 ▲4.56903.98 ▲210.1343.17 ▼6.75
Media Library /wp-admin/upload.php1,382 ▼04.21 ▼0.0297.55 ▼7.3644.43 ▲1.02

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • The uninstall procedure has failed, leaving 7 options in the database
    • widget_recent-comments
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_story_lines_widget
    • db_upgraded
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though no errors were found, this is by no means an exhaustive test

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
Please take a closer look at the following
  • 3× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_block_wrapper_attributes() in wp-content/plugins/story-lines/blocks/build/story-lines/template.php:1
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/story-lines/public/partials/story-lines-widget.php:24
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/story-lines/admin/partials/story-lines-meta-box.php:17

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)
Everything seems fine on the user side

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
These attributes need your attention:
  • Screenshots: Add images for these screenshots: #1 (The Story Lines display in the post.), #2 (The Story Lines section of the post editor.)
You can take inspiration from this readme.txt

story-lines/story-lines.php Passed 13 tests

The principal PHP file in "Story Lines" v. 2.1 is loaded by WordPress automatically on each request
117 characters long description:
Add a list of story highlights at the top of your posts to let your readers really know what your story is all about.

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 detected1,170 lines of code in 34 files:
LanguageFilesBlank linesComment linesLines of code
PHP15189600579
PO File6132162453
Markdown322074
JSON10055
CSS5135
JavaScript4034

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.22
Average class complexity5.18
▷ Minimum class complexity1.00
▷ Maximum class complexity28.00
Average method complexity2.02
▷ Minimum method complexity1.00
▷ Maximum method complexity21.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes11
▷ Abstract classes00.00%
▷ Concrete classes11100.00%
▷ Final classes00.00%
Methods45
▷ Static methods24.44%
▷ Public methods3782.22%
▷ Protected methods00.00%
▷ Private methods817.78%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
3 PNG files occupy 0.38MB with 0.28MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png142.66KB55.39KB▼ 61.17%
screenshot-2.png226.37KB74.25KB▼ 67.20%
images/story-lines.png15.92KB1.01KB▼ 93.64%