84% wp-branches-for-post

Code Review | WP Branches For Post

WordPress plugin WP Branches For Post scored84%from 54 tests.

About plugin

  • Plugin page: wp-branches-for-post
  • Plugin version: 1.3.0
  • PHP compatiblity: 5.6.40+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.7-5.3.2
  • WordPress version: 6.3.1
  • First release: Mar 5, 2020
  • Latest release: Mar 23, 2020
  • Number of updates: 26
  • Update frequency: every 0.7 days
  • Top authors: haokexin (100%)

Code review

54 tests

User reviews

1 review

Install metrics

50+ active /712 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.05MB] [CPU: ▼5.00ms] Passed 4 tests

Server-side resources used by WP Branches For Post
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0636.09 ▼2.10
Dashboard /wp-admin3.36 ▲0.0243.14 ▼17.01
Posts /wp-admin/edit.php3.42 ▲0.0645.73 ▲0.80
Add New Post /wp-admin/post-new.php5.94 ▲0.0687.52 ▼0.74
Media Library /wp-admin/upload.php3.28 ▲0.0634.12 ▼0.15

Server storage [IO: ▲0.06MB] [DB: ▲0.07MB] Passed 3 tests

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 13 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
can_compress_scripts
widget_theysaidso_widget
theysaidso_admin_options
db_upgraded
widget_recent-comments

Browser metrics Passed 4 tests

WP Branches For Post: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲4714.72 ▲0.161.62 ▲0.1437.17 ▲0.09
Dashboard /wp-admin2,197 ▲165.61 ▼0.0692.48 ▼3.8938.52 ▼0.90
Posts /wp-admin/edit.php2,103 ▼01.98 ▼0.0038.88 ▲2.1937.22 ▲0.15
Add New Post /wp-admin/post-new.php1,542 ▲1618.17 ▼4.88612.05 ▼84.6959.79 ▲1.15
Media Library /wp-admin/upload.php1,402 ▲54.24 ▲0.0698.05 ▼1.1343.58 ▼0.12

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
These items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts

Smoke tests 75% 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)
Good news, no errors were detected

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 take a closer look at the following
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-branches-for-post/post-branch.php:18

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
1 plugin tags: post branch

wp-branches-for-post/post-branch.php 92% from 13 tests

This is the main PHP file of "WP Branches For Post" version 1.3.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:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("wp-branches-for-post.php" instead of "post-branch.php")

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
Good job! No executable or dangerous file extensions detected400 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP11785260
PO File32148108
CSS13030
SVG2002

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.39
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%
Functions16
▷ Named functions16100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
There are no PNG files in this plugin