93% disable-blogging

Code Review | Disable Blogging in WordPress

WordPress plugin Disable Blogging in WordPress scored 93% from 54 tests.

About plugin

  • Plugin page: disable-blogging
  • Plugin version: 2.1.0
  • PHP compatiblity: 5.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9-5.5.1
  • WordPress version: 5.8.1
  • First release: May 18, 2016
  • Latest release: Sep 14, 2020
  • Number of updates: 40
  • Update frequency: every 39.5 days
  • Top authors: factmaven (100%)

Code review

54 tests

User reviews

17 reviews

Install metrics

10,000+ active / 54,685 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.28MB] [CPU: ▼144.02ms] Passed 4 tests

Server-side resources used by Disable Blogging in WordPress
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.02 ▲0.3049.41 ▲24.68
Dashboard /wp-admin3.39 ▲0.3448.00 ▼7.60
Posts /wp-admin/edit.php3.45 ▲0.3454.16 ▲7.14
Add New Post /wp-admin/post-new.php5.67 ▲0.24101.60 ▼580.24
Media Library /wp-admin/upload.php3.26 ▲0.2638.14 ▲4.62
Blogging /wp-admin/options-general.php?page=blogging3.2734.48

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 23 new files
Database: no new tables, 5 new options
New WordPress options
factmaven_dsbl_profile
factmaven_dsbl_general
factmaven_dsbl_menu
factmaven_dsbl_extra
factmaven_dsbl_version

Browser metrics Passed 4 tests

An overview of browser requirements for Disable Blogging in WordPress
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,169 ▼42717.07 ▲1.577.92 ▼4.0349.32 ▼4.23
Dashboard /wp-admin2,497 ▼4377.83 ▲1.89146.39 ▼7.5295.45 ▼30.08
Posts /wp-admin/edit.php2,950 ▲2114.26 ▲1.5784.87 ▲18.7094.48 ▲0.21
Add New Post /wp-admin/post-new.php1,671 ▼1218.59 ▼0.20351.35 ▼74.97131.79 ▲7.76
Media Library /wp-admin/upload.php1,793 ▼174.91 ▼0.09124.58 ▼35.89138.47 ▲13.99
Blogging /wp-admin/options-general.php?page=blogging1,8844.1686.2589.38

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Uninstaller ran successfully

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
The following issues need your attention
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Class 'Fact_Maven_Disable_Blogging_Settings_API' not found in wp-content/plugins/disable-blogging/admin/settings-page.php:17
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/disable-blogging/admin/plugin-meta.php:14

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 90% from 29 tests

readme.txt 88% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
Attributes that require attention:
  • Screenshots: These screenshots need descriptions #2, #3, #4 in disable-blogging/assets to your readme.txt
  • Tags: Too many tags (37 tag instead of maximum 10); only the first 5 tags are used in your directory listing
The official readme.txt might help

disable-blogging/disable-blogging.php 92% from 13 tests

Analyzing the main PHP file in "Disable Blogging in WordPress" version 2.1.0
The following require your attention:
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
No dangerous file extensions were detected1,494 lines of code in 17 files:
LanguageFilesBlank linesComment linesLines of code
PHP101954361,222
PO File184119222
CSS60550

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.51
Average class complexity27.86
▷ Minimum class complexity4.00
▷ Maximum class complexity69.00
Average method complexity3.14
▷ Minimum method complexity1.00
▷ Maximum method complexity19.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods80
▷ Static methods00.00%
▷ Public methods7998.75%
▷ Protected methods00.00%
▷ Private methods11.25%
Functions1
▷ Named functions00.00%
▷ Anonymous functions1100.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
No PNG images were found in this plugin