61% beycanpress-advanced-story

Code Review | BP Story - WordPress user stories (story) plugin

WordPress plugin BP Story - WordPress user stories (story) plugin scored 61% from 54 tests.

About plugin

  • Plugin page: beycanpress-advan...
  • Plugin version: 3.1.0
  • PHP compatiblity: 7.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.8
  • WordPress version: 5.8.1
  • First release: Jan 5, 2021
  • Latest release: Sep 14, 2021
  • Number of updates: 34
  • Update frequency: every 7.4 days
  • Top authors: beycandeveloper (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

200+ active / 3,991 total downloads

Benchmarks

Plugin footprint 65% 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: ▲1.13MB] [CPU: ▼128.57ms] Passed 4 tests

Server-side resources used by BP Story - WordPress user stories (story) plugin
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.06 ▲0.3440.07 ▲13.99
Dashboard /wp-admin4.49 ▲1.4360.73 ▲18.18
Posts /wp-admin/edit.php4.57 ▲1.4660.42 ▲13.49
Add New Post /wp-admin/post-new.php6.80 ▲1.3696.33 ▼542.38
Media Library /wp-admin/upload.php4.38 ▲1.3843.20 ▲0.63
Admin story boxes /wp-admin/admin.php?page=bpstory-admin-story-boxes4.4442.46
Settings /wp-admin/admin.php?page=bpstory-settings4.3946.60
Admin stories /wp-admin/admin.php?page=bpstory-admin-stories4.4042.23

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 171 new files
Database: 2 new tables, 2 new options
New tables
wp_bpstory_admin_story_boxes
wp_bpstory_admin_stories
New WordPress options
bpstory_settings_db_version
bpstory_settings

Browser metrics Passed 4 tests

An overview of browser requirements for BP Story - WordPress user stories (story) plugin
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,971 ▲37520.42 ▲4.8553.34 ▲44.5445.30 ▼2.84
Dashboard /wp-admin3,210 ▲2797.94 ▲2.03170.75 ▲10.83107.90 ▼0.24
Posts /wp-admin/edit.php3,009 ▲2704.19 ▲1.4785.12 ▲17.5285.14 ▼6.29
Add New Post /wp-admin/post-new.php1,700 ▼1,94818.45 ▲3.43382.42 ▼115.98128.74 ▲22.19
Media Library /wp-admin/upload.php1,858 ▲514.77 ▼0.27115.94 ▼44.44113.94 ▼6.89
Admin story boxes /wp-admin/admin.php?page=bpstory-admin-story-boxes1,5053.3474.8464.20
Settings /wp-admin/admin.php?page=bpstory-settings1,7444.3687.71103.80
Admin stories /wp-admin/admin.php?page=bpstory-admin-stories1,5053.3376.7767.14

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The following items require your attention
  • This plugin does not fully uninstall, leaving 2 tables in the database
    • wp_bpstory_admin_story_boxes
    • wp_bpstory_admin_stories
  • The uninstall procedure has failed, leaving 2 options in the database
    • bpstory_settings
    • bpstory_settings_db_version

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
These server-side errors were triggered
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=bpstory-admin-stories
    • > Warning in wp-includes/pluggable.php+1343
    Cannot modify header information - headers already sent by (output started at wp-includes/formatting.php:5740)

SRP 0% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Almost there! Just fix the following items
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/beycanpress-advanced-story/vendor/beycan/wordpress-table-creator/src/Table.php
  • 21× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html__() in wp-content/plugins/beycanpress-advanced-story/views/pages/admin-stories/add-new.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html__() in wp-content/plugins/beycanpress-advanced-story/views/pages/admin-story-boxes/form.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html__() in wp-content/plugins/beycanpress-advanced-story/views/pages/admin-story-boxes/edit.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html__() in wp-content/plugins/beycanpress-advanced-story/views/pages/admin-stories/list.php:3
    • > PHP Fatal error
      Trait 'BeycanPress\\Story\\Traits\\Helpers' not found in wp-content/plugins/beycanpress-advanced-story/classes/RegisterIntegrations.php on line 7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html__() in wp-content/plugins/beycanpress-advanced-story/views/pages/admin-story-boxes/list.php:3
    • > PHP Fatal error
      Trait 'BeycanPress\\Story\\Traits\\Helpers' not found in wp-content/plugins/beycanpress-advanced-story/classes/StoryTypes/AdminStories.php on line 11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/beycanpress-advanced-story/views/notice.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html__() in wp-content/plugins/beycanpress-advanced-story/views/pages/admin-stories/form.php:7
    • > PHP Fatal error
      Trait 'BeycanPress\\Story\\Traits\\Helpers' not found in wp-content/plugins/beycanpress-advanced-story/classes/Pages/AdminStoryBoxes.php on line 11

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration 83% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Attributes that require attention:
  • Screenshots: Screenshot #18 (18) image missing
You can take inspiration from this readme.txt

beycanpress-advanced-story/bpstory.php 69% from 13 tests

This is the main PHP file of "BP Story - WordPress user stories (story) plugin" version 3.1.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
You should first fix the following items:
  • Domain Path: The domain path folder was not found ("/languages")
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("beycanpress-advanced-story.php" instead of "bpstory.php")
  • Git Repository: Please remove the Git repository from this plugin

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
No dangerous file extensions were detected14,404 lines of code in 136 files:
LanguageFilesBlank linesComment linesLines of code
PHP962,1561,2067,455
PO File203,0373,4146,180
Markdown31120442
JavaScript52628211
JSON300106
CSS62127
SVG2002
XML1001

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.58
Average class complexity19.38
▷ Minimum class complexity1.00
▷ Maximum class complexity152.00
Average method complexity5.26
▷ Minimum method complexity1.00
▷ Maximum method complexity57.00
Code structure
Namespaces9
Interfaces0
Traits1
Classes65
▷ Abstract classes23.08%
▷ Concrete classes6396.92%
▷ Final classes11.59%
Methods295
▷ Static methods4816.27%
▷ Public methods25987.80%
▷ Protected methods175.76%
▷ Private methods196.44%
Functions47
▷ Named functions2246.81%
▷ Anonymous functions2553.19%
Constants1
▷ Global constants1100.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
2 PNG files occupy 0.03MB with 0.01MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
includes/codestar-framework-2.2.2/assets/images/checkerboard.png2.29KB2.54KB0.00%
assets/img/buy-now-premium.png32.69KB11.77KB▼ 64.00%