78% stapp-divider

Code Review | STApp Divider Plugin

WordPress plugin STApp Divider Plugin scored78%from 54 tests.

About plugin

  • Plugin page: stapp-divider
  • Plugin version: 1.3
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.5.6
  • WordPress version: 6.3.1
  • First release: Nov 23, 2020
  • Latest release: Jan 18, 2021
  • Number of updates: 15
  • Update frequency: every 10.5 days
  • Top authors: stappdevelopment (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /530 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
This plugin's installer ran successfully

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

An overview of server-side resources used by STApp Divider Plugin
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0037.91 ▲1.16
Dashboard /wp-admin3.32 ▲0.0246.03 ▼1.10
Posts /wp-admin/edit.php3.37 ▲0.0145.86 ▲1.50
Add New Post /wp-admin/post-new.php5.90 ▲0.0185.67 ▼6.44
Media Library /wp-admin/upload.php3.24 ▲0.0135.06 ▼3.49
Pro Version /wp-admin/admin.php?page=stappdiv_pro_version3.2726.53
Overview /wp-admin/admin.php?page=stappdiv3.2540.63
New /wp-admin/admin.php?page=stappdiv_new3.2931.72

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 31 new files
Database: 1 new table, 8 new options
New tables
wp_stapp_divider_settings
New WordPress options
theysaidso_admin_options
widget_recent-comments
stapp_divider_version
db_upgraded
can_compress_scripts
stapp_divider_counter
widget_theysaidso_widget
widget_recent-posts

Browser metrics Passed 4 tests

A check of browser resources used by STApp Divider Plugin
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,897 ▲15113.42 ▼0.948.78 ▲7.2237.76 ▲1.01
Dashboard /wp-admin2,222 ▲425.49 ▼0.2183.11 ▼9.1937.41 ▼2.69
Posts /wp-admin/edit.php2,127 ▲272.02 ▲0.0435.86 ▲1.3835.72 ▼1.75
Add New Post /wp-admin/post-new.php1,548 ▲2023.65 ▲0.63670.72 ▼20.4261.62 ▲8.42
Media Library /wp-admin/upload.php1,427 ▲244.19 ▼0.02104.28 ▼9.2745.94 ▼0.61
Pro Version /wp-admin/admin.php?page=stappdiv_pro_version1,3611.9921.9737.50
Overview /wp-admin/admin.php?page=stappdiv9242.1423.9961.33
New /wp-admin/admin.php?page=stappdiv_new1,6561.8030.1962.26

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting 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 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following
  • 17× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Warning
      include_once(): Failed opening 'STAPP_DIVIDER_PLUGIN_DIR/includes/db/stapp_divider_writeData.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/stapp-divider/admin/admin.php on line 3
    • > PHP Warning
      require_once(STAPP_DIVIDER_PLUGIN_DIR/includes/stapp_divider_plugin.php): failed to open stream: No such file or directory in wp-content/plugins/stapp-divider/stapp_divider_settings.php on line 4
    • > PHP Warning
      include_once(STAPP_DIVIDER_PLUGIN_DIR/includes/db/stapp_divider_writeData.php): failed to open stream: No such file or directory in wp-content/plugins/stapp-divider/admin/admin.php on line 3
    • > PHP Warning
      include_once(STAPP_DIVIDER_PLUGIN_DIR/includes/db/stapp_divider_readData.php): failed to open stream: No such file or directory in wp-content/plugins/stapp-divider/includes/stapp_activate_plugin.php on line 3
    • > PHP Warning
      Use of undefined constant STAPP_DIVIDER_PLUGIN_DIR - assumed 'STAPP_DIVIDER_PLUGIN_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/stapp-divider/stapp_divider_settings.php on line 4
    • > PHP Warning
      Use of undefined constant STAPP_DIVIDER_PLUGIN_DIR - assumed 'STAPP_DIVIDER_PLUGIN_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/stapp-divider/admin/admin.php on line 3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function current_user_can() in wp-content/plugins/stapp-divider/admin/menu/ProVersionSubMenuHTML.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/stapp-divider/admin/menu/CreateSubMenuHTML_Color.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function current_user_can() in wp-content/plugins/stapp-divider/admin/menu/CreateSubMenuHTML.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/stapp-divider/admin/menu/CreateSubMenuHTML_General.php:2

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
These are user-side errors you should fix
    • > GET request to /wp-admin/admin.php?page=stappdiv_pro_version
    • > Network (severe)
    includes/css/proversion_stylesheet.css - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
4 plugin tags: headline, animation, separator, divider

stapp-divider/stapp_divider.php 85% from 13 tests

"STApp Divider Plugin" version 1.3's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
You should first fix the following items:
  • Text Domain: Please use dashes and lowercase characters for text domains
  • Main file name: The principal plugin file should be the same as the plugin slug ("stapp-divider.php" instead of "stapp_divider.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Everything looks great! No dangerous files found in this plugin2,625 lines of code in 27 files:
LanguageFilesBlank linesComment linesLines of code
PHP17262491,242
CSS415021665
JavaScript314116443
HTML2812221
SQL10054

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.21
Average class complexity9.25
▷ Minimum class complexity3.00
▷ Maximum class complexity27.00
Average method complexity1.82
▷ Minimum method complexity1.00
▷ Maximum method complexity11.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods80
▷ Static methods00.00%
▷ Public methods3240.00%
▷ Protected methods00.00%
▷ Private methods4860.00%
Functions18
▷ Named functions18100.00%
▷ Anonymous functions00.00%
Constants20
▷ Global constants840.00%
▷ Class constants1260.00%
▷ Public constants12100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
No PNG files were detected