73% internal-comments

Code Review | Internal Comments

WordPress plugin Internal Comments scored73%from 54 tests.

About plugin

  • Plugin page: internal-comments
  • Plugin version: 1.2.4
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.5-6.0
  • WordPress version: 6.3.1
  • First release: Jul 27, 2021
  • Latest release: Jul 17, 2022
  • Number of updates: 10
  • Update frequency: every 36.6 days
  • Top authors: deepwebsolutions (100%)

Code review

54 tests

User reviews

1 review

Install metrics

40+ active /1,101 total downloads

Benchmarks

Plugin footprint 64% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Install script ran successfully

Server metrics [RAM: ▲6.79MB] [CPU: ▲43.02ms] 25% from 4 tests

Server-side resources used by Internal Comments
Please take the time to fix the following items
  • RAM: Try to keep total memory usage under 10MB (currently 10.02MB on /wp-admin/options-general.php?page=dws-internal-comments)
  • CPU: You should keep total CPU usage under 500.00ms (currently 1,860.48ms on /wp-admin/admin.php?page=internal-comments)
  • Extra RAM: The extra memory usage should kept under 5MB (currently 6.79MB on /wp-admin/options-general.php?page=dws-internal-comments)
PageMemory (MB)CPU Time (ms)
Home /10.22 ▲6.7582.26 ▲34.46
Dashboard /wp-admin10.11 ▲6.8193.27 ▲40.91
Posts /wp-admin/edit.php10.23 ▲6.87111.07 ▲59.34
Add New Post /wp-admin/post-new.php12.71 ▲6.82134.78 ▲37.35
Media Library /wp-admin/upload.php10.03 ▲6.80101.44 ▲62.54
All Comments /wp-admin/edit-comments.php10.1094.97
Internal Comments /wp-admin/admin.php?page=internal-comments10.291,860.48
Freemius Debug [v.2.4.4] /wp-admin/admin.php?page=freemius10.2681.98
Internal Comments /wp-admin/edit-comments.php?comment_type=dws_internal10.0887.75
Internal Comments /wp-admin/options-general.php?page=dws-internal-comments10.0288.98

Server storage [IO: ▲4.55MB] [DB: ▲0.01MB] Passed 3 tests

Filesystem and database footprint
This plugin installed successfully
Filesystem: 737 new files
Database: no new tables, 12 new options
New WordPress options
fs_gdpr
theysaidso_admin_options
can_compress_scripts
internal_comments_original_version
fs_active_plugins
internal_comments_version
widget_theysaidso_widget
db_upgraded
fs_debug_mode
widget_recent-comments
...

Browser metrics Passed 4 tests

Internal Comments: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,860 ▲9914.25 ▼0.111.82 ▲0.1826.38 ▼18.63
Dashboard /wp-admin2,230 ▲505.52 ▼0.1395.39 ▲1.2146.39 ▲3.56
Posts /wp-admin/edit.php2,142 ▲421.98 ▼0.0340.88 ▲5.5141.30 ▲4.67
Add New Post /wp-admin/post-new.php1,551 ▲2321.02 ▼2.54660.23 ▼27.9956.34 ▲0.51
Media Library /wp-admin/upload.php1,438 ▲384.26 ▲0.13100.34 ▼15.2346.59 ▼1.02
All Comments /wp-admin/edit-comments.php1,8482.2741.6340.25
Internal Comments /wp-admin/admin.php?page=internal-comments1,0051.6726.2254.66
Freemius Debug [v.2.4.4] /wp-admin/admin.php?page=freemius1,0781.6623.9031.16
Internal Comments /wp-admin/edit-comments.php?comment_type=dws_internal1,5772.2835.8633.77
Internal Comments /wp-admin/options-general.php?page=dws-internal-comments8642.0425.8930.69

Uninstaller [IO: ▲0.00MB] [DB: ▲0.01MB] 50% 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
  • Uninstall procedure validation failed for this plugin
    • > Notice in wp-content/plugins/internal-comments/vendor/freemius/wordpress-sdk/includes/class-freemius.php+8575
    Undefined property: stdClass::$plugins
  • Zombie WordPress options were found after uninstall: 12 options
    • widget_theysaidso_widget
    • fs_debug_mode
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded
    • fs_accounts
    • fs_active_plugins
    • fs_gdpr
    • internal_comments_original_version
    • theysaidso_admin_options
    • ...

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

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 fix the following
  • 62× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Interface 'DWS_IC_Deps\\DI\\Definition\\Definition' not found in wp-content/plugins/internal-comments/dependencies/dependency-injection/php-di/php-di/src/Definition/ArrayDefinition.php:12
    • > PHP Fatal error
      Uncaught Error: Interface 'DWS_IC_Deps\\DI\\Definition\\Helper\\DefinitionHelper' not found in wp-content/plugins/internal-comments/dependencies/dependency-injection/php-di/php-di/src/Definition/Helper/CreateDefinitionHelper.php:16
    • > PHP Fatal error
      Uncaught Error: Class 'DWS_IC_Deps\\DeepWebSolutions\\Framework\\Core\\Functionalities\\AbstractPermissionsChildFunctionality' not found in wp-content/plugins/internal-comments/src/includes/Permissions/OutputPermissions.php:13
    • > PHP Fatal error
      Uncaught Error: Interface 'DWS_IC_Deps\\DI\\Definition\\Definition' not found in wp-content/plugins/internal-comments/dependencies/dependency-injection/php-di/php-di/src/Definition/ValueDefinition.php:12
    • > PHP Fatal error
      Uncaught Error: Interface 'DWS_IC_Deps\\Invoker\\ParameterResolver\\ParameterResolver' not found in wp-content/plugins/internal-comments/dependencies/dependency-injection/php-di/invoker/src/ParameterResolver/Container/ParameterNameContainerResolver.php:12
    • > PHP Fatal error
      Uncaught Error: Interface 'DWS_IC_Deps\\DI\\Definition\\Source\\DefinitionSource' not found in wp-content/plugins/internal-comments/dependencies/dependency-injection/php-di/php-di/src/Definition/Source/SourceChain.php:13
    • > PHP Fatal error
      Uncaught Error: Interface 'DWS_IC_Deps\\Laravel\\SerializableClosure\\Contracts\\Serializable' not found in wp-content/plugins/internal-comments/dependencies/dependency-injection/laravel/serializable-closure/src/Serializers/Native.php:14
    • > PHP Fatal error
      Uncaught Error: Interface 'DWS_IC_Deps\\Invoker\\ParameterResolver\\ParameterResolver' not found in wp-content/plugins/internal-comments/dependencies/dependency-injection/php-di/invoker/src/ParameterResolver/Container/TypeHintContainerResolver.php:13
    • > PHP Fatal error
      Uncaught Error: Interface 'DWS_IC_Deps\\Invoker\\ParameterResolver\\ParameterResolver' not found in wp-content/plugins/internal-comments/dependencies/dependency-injection/php-di/invoker/src/ParameterResolver/AssociativeArrayResolver.php:15
    • > PHP Fatal error
      Uncaught Error: Interface 'DWS_IC_Deps\\DI\\Definition\\Source\\DefinitionSource' not found in wp-content/plugins/internal-comments/dependencies/dependency-injection/php-di/php-di/src/Definition/Source/AnnotationBasedAutowiring.php:32

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
2 plugin tags: private comments, internal comments

internal-comments/internal-comments.php 92% from 13 tests

The main PHP script in "Internal Comments" version 1.2.4 is automatically included on every request by WordPress
You should first fix the following items:
  • Description: The description should be shorter than 140 characters (currently 141 characters long)

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
No dangerous file extensions were detected47,933 lines of code in 571 files:
LanguageFilesBlank linesComment linesLines of code
PHP5318,78233,08746,581
JavaScript76663437
PO File2144192326
TypeScript549163206
CSS1948144
Sass4240144
JSON10048
SVG11030
Markdown14017

PHP code 50% from 2 tests

Analyzing cyclomatic complexity and code structure
The following items need your attention
  • Class cyclomatic complexity should be reduced to less than 1000 (currently 2,911)
Cyclomatic complexity
Average complexity per logical line of code0.59
Average class complexity15.51
▷ Minimum class complexity1.00
▷ Maximum class complexity2,911.00
Average method complexity3.59
▷ Minimum method complexity1.00
▷ Maximum method complexity86.00
Code structure
Namespaces99
Interfaces81
Traits98
Classes249
▷ Abstract classes3212.85%
▷ Concrete classes21787.15%
▷ Final classes198.76%
Methods2,535
▷ Static methods31412.39%
▷ Public methods1,98878.42%
▷ Protected methods1656.51%
▷ Private methods38215.07%
Functions230
▷ Named functions17174.35%
▷ Anonymous functions5925.65%
Constants221
▷ Global constants15268.78%
▷ Class constants6931.22%
▷ Public constants6797.10%

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
3 PNG files occupy 0.03MB with 0.01MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
vendor/freemius/wordpress-sdk/assets/img/theme-icon.png10.97KB5.78KB▼ 47.37%
vendor/freemius/wordpress-sdk/assets/img/plugin-icon.png9.16KB5.26KB▼ 42.58%
vendor/freemius/wordpress-sdk/assets/img/internal-comments.png6.20KB4.20KB▼ 32.29%