78% sectionly

Code Review | Sectionly

WordPress plugin Sectionly scored78%from 54 tests.

About plugin

  • Plugin page: sectionly
  • Plugin version: 1.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-5.8
  • WordPress version: 6.3.1
  • First release: Jan 13, 2022
  • Latest release: Jan 13, 2022
  • Number of updates: 2
  • Update frequency: every 0.5 days
  • Top authors: bracesol (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /872 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 gracefully, with no errors

Server metrics [RAM: ▲0.17MB] [CPU: ▼2.72ms] Passed 4 tests

An overview of server-side resources used by Sectionly
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.64 ▲0.1843.06 ▼1.72
Dashboard /wp-admin3.47 ▲0.1753.07 ▼0.22
Posts /wp-admin/edit.php3.58 ▲0.2355.89 ▲2.00
Add New Post /wp-admin/post-new.php6.07 ▲0.1889.41 ▼10.92
Media Library /wp-admin/upload.php3.39 ▲0.1643.54 ▲6.17

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 43 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
theysaidso_admin_options
widget_recent-comments
db_upgraded
can_compress_scripts
widget_theysaidso_widget

Browser metrics Passed 4 tests

Checking browser requirements for Sectionly
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,908 ▲12213.40 ▼0.959.08 ▲6.8944.14 ▼2.48
Dashboard /wp-admin2,202 ▲225.61 ▼0.0489.47 ▲1.0338.40 ▼2.91
Posts /wp-admin/edit.php2,104 ▲42.02 ▲0.0141.19 ▲0.4336.10 ▼1.87
Add New Post /wp-admin/post-new.php1,532 ▲623.53 ▲0.42673.56 ▲25.0361.55 ▲9.93
Media Library /wp-admin/upload.php1,401 ▲14.11 ▼0.09107.52 ▲7.6547.90 ▲4.07

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Everything seems fine, however this is by no means an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Almost there! Just fix the following items
  • 2× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/sectionly/public/partials/sectionly-public-display.php
    • > /wp-content/plugins/sectionly/admin/partials/sectionly-admin-display.php
  • 6× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/sectionly/includes/vc-shortocdes/shortcodes/sectionly-testimonial.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/sectionly/includes/vc-shortocdes/shortcodes/sectionly-services.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/sectionly/includes/vc-shortocdes/shortcodes/sectionly-blogs.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/sectionly/includes/vc-shortocdes/shortcodes/sectionly-team.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/sectionly/includes/vc-shortocdes/regsiter-vc-shortcodes.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/sectionly/includes/vc-shortocdes/shortcodes/sectionly-progressbar.php:7

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
These attributes need your attention:
  • Contributors: The plugin contributors field is missing
The official readme.txt is a good inspiration

sectionly/sectionly.php 92% from 13 tests

Analyzing the main PHP file in "Sectionly" version 1.0
The following require your attention:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 288 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
There were no executable files found in this plugin1,587 lines of code in 32 files:
LanguageFilesBlank linesComment linesLines of code
PHP253686241,253
CSS36026252
JavaScript4307682

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.47
Average class complexity2.23
▷ Minimum class complexity1.00
▷ Maximum class complexity14.00
Average method complexity1.27
▷ Minimum method complexity1.00
▷ Maximum method complexity13.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes13
▷ Abstract classes00.00%
▷ Concrete classes13100.00%
▷ Final classes00.00%
Methods59
▷ Static methods35.08%
▷ Public methods4372.88%
▷ Protected methods1016.95%
▷ Private methods610.17%
Functions16
▷ Named functions1593.75%
▷ Anonymous functions16.25%
Constants6
▷ Global constants6100.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.00MB
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
public/images/twitter.png0.42KB0.29KB▼ 30.48%
public/images/instagram.png0.95KB1.14KB0.00%
public/images/facebook.png0.62KB0.63KB0.00%
public/images/linkedin.png0.73KB0.91KB0.00%