90% code-snippets-in-comments

Code Review | Code Snippets in Comments

WordPress plugin Code Snippets in Comments scored 90% from 54 tests.

About plugin

  • Plugin page: code-snippets-in-...
  • Plugin version: 0.9
  • PHP compatiblity: 5.6.20+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.4.1
  • WordPress version: 6.3.1
  • First release: May 22, 2020
  • Latest release: May 22, 2020
  • Number of updates: 5
  • Update frequency: every 0.8 days
  • Top authors: yannyann (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 456 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

Server metrics [RAM: ▲0.08MB] [CPU: ▼4.25ms] Passed 4 tests

A check of server-side resources used by Code Snippets in Comments
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0838.09 ▼1.98
Dashboard /wp-admin3.38 ▲0.0844.47 ▼4.94
Posts /wp-admin/edit.php3.50 ▲0.1443.58 ▲0.48
Add New Post /wp-admin/post-new.php5.96 ▲0.0881.42 ▼9.16
Media Library /wp-admin/upload.php3.31 ▲0.0835.07 ▼0.91

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 9 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
can_compress_scripts
db_upgraded
widget_theysaidso_widget
widget_recent-posts
widget_recent-comments

Browser metrics Passed 4 tests

Checking browser requirements for Code Snippets in Comments
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.29 ▼1.341.69 ▼0.0645.89 ▲1.66
Dashboard /wp-admin2,209 ▲184.87 ▲0.00109.23 ▲3.9838.50 ▼7.13
Posts /wp-admin/edit.php2,092 ▲62.05 ▲0.0441.72 ▲7.4636.66 ▲4.66
Add New Post /wp-admin/post-new.php1,535 ▲123.26 ▲0.17665.48 ▲9.3454.41 ▼7.71
Media Library /wp-admin/upload.php1,391 ▲34.20 ▼0.12102.82 ▲0.7247.50 ▲1.44

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
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments
    • widget_recent-posts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP Passed 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
No output text or server-side errors detected on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 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
5 plugin tags: code highlighting, code syntax, syntax highlight, comments, code

code-snippets-in-comments/code-snippets-in-comments.php Passed 13 tests

The principal PHP file in "Code Snippets in Comments" v. 0.9 is loaded by WordPress automatically on each request
57 characters long description:
This plugin let you reply with code snippets more easily.

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 detected1,201 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
Markdown11210553
PHP217881324
CSS14412231
JavaScript332293

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.56
Average class complexity36.50
▷ Minimum class complexity28.00
▷ Maximum class complexity45.00
Average method complexity3.63
▷ Minimum method complexity1.00
▷ Maximum method complexity14.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes150.00%
Methods27
▷ Static methods2074.07%
▷ Public methods2592.59%
▷ Protected methods00.00%
▷ Private methods27.41%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants7
▷ Global constants7100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
There are no PNG files in this plugin