84% bbpress-topic-lock

Code Review | bbPress - Topic Lock

WordPress plugin bbPress - Topic Lock scored84%from 54 tests.

About plugin

  • Plugin page: bbpress-topic-lock
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.6-4.1
  • WordPress version: 6.3.1
  • First release: Sep 13, 2013
  • Latest release: Dec 17, 2014
  • Number of updates: 4
  • Update frequency: every 115.0 days
  • Top authors: mordauk (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /2,470 total downloads


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.01MB] [CPU: ▼7.66ms] Passed 4 tests

This is a short check of server-side resources used by bbPress - Topic Lock
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0138.96 ▼5.58
Dashboard /wp-admin3.31 ▲0.0148.01 ▼13.09
Posts /wp-admin/edit.php3.36 ▲0.0146.94 ▼0.51
Add New Post /wp-admin/post-new.php5.89 ▲0.0189.83 ▼11.44
Media Library /wp-admin/upload.php3.23 ▲0.0138.62 ▲3.94

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 5 new files
Database: no new tables, 6 new options
New WordPress options

Browser metrics Passed 4 tests

Checking browser requirements for bbPress - Topic Lock
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲2914.78 ▲0.382.08 ▼0.0542.93 ▼18.70
Dashboard /wp-admin2,206 ▲214.86 ▼1.00107.65 ▼37.3647.93 ▲1.09
Posts /wp-admin/edit.php2,089 ▼32.06 ▲0.0638.79 ▼14.9736.53 ▼4.80
Add New Post /wp-admin/post-new.php1,533 ▲1423.44 ▲0.17727.50 ▲17.6460.23 ▲3.22
Media Library /wp-admin/upload.php1,388 ▼04.13 ▼0.05120.58 ▲10.0449.83 ▼2.28

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
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments

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)
Even though everything seems fine, this is not an exhaustive test

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
Almost there! Just fix the following items
  • 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/bbpress-topic-lock/bbpress-topic-lock.php:20

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
There were no browser issues found


Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
These attributes need your attention:
  • Screenshots: Screenshot #1 (Topic being viewed by another moderator) image missing
Please take inspiration from this readme.txt

bbpress-topic-lock/bbpress-topic-lock.php Passed 13 tests

The primary PHP file in "bbPress - Topic Lock" version 1.0 is used by WordPress to initiate all plugin functionality
73 characters long description:
Warns moderators if another moderator is currently viewing the same topic

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
No dangerous file extensions were detected126 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity19.00
▷ Minimum class complexity19.00
▷ Maximum class complexity19.00
Average method complexity3.25
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
▷ Static methods00.00%
▷ Public methods675.00%
▷ Protected methods00.00%
▷ Private methods225.00%
▷ Named functions00.00%
▷ Anonymous functions00.00%
▷ 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
1 PNG file occupies 0.13MB with 0.09MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png132.60KB41.11KB▼ 69.00%