10% comment-refs

Code Review | CommentRefs

WordPress plugin CommentRefs scored10%from 54 tests.

About plugin

  • Plugin page: comment-refs
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-4.9.8
  • WordPress version: 6.3.1
  • First release: Sep 11, 2018
  • Latest release: Sep 11, 2018
  • Number of updates: 3
  • Update frequency: every 0.7 days
  • Top authors: basicblogtalk (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /740 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
It is recommended to fix the following installer errors
  • Install procedure validation failed for this plugin
    • > Deprecated in wp-content/plugins/comment-refs/inc/Api/Callbacks/AdminCallbacksCrefs.php+247
    Array and string offset access syntax with curly braces is deprecated

Server metrics [RAM: ▼1.77MB] [CPU: ▼60.45ms] Passed 4 tests

Server-side resources used by CommentRefs
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.23 ▼1.235.71 ▼36.99
Dashboard /wp-admin2.25 ▼1.096.90 ▼60.62
Posts /wp-admin/edit.php2.25 ▼1.106.28 ▼44.08
Add New Post /wp-admin/post-new.php2.25 ▼3.637.85 ▼100.10
Media Library /wp-admin/upload.php2.25 ▼0.986.74 ▼31.39

Server storage [IO: ▲0.16MB] [DB: ▲0.00MB] 67% from 3 tests

Filesystem and database footprint
Please fix the following
  • Illegal file modification found: 1 file (4.00KB) outside of "wp-content/plugins/comment-refs/" and "wp-content/uploads/"
    • (new file) wp-content/mgd_mirror/mgd_maximinodotpy-gitdown-test-repository
Filesystem: 43 new files
Database: no new tables, 9 new options
New WordPress options
widget_recent-comments
crefs_post_type
crefs_get_dofollow
can_compress_scripts
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-posts
db_upgraded
crefs_get_ten_posts

Browser metrics Passed 4 tests

This is an overview of browser requirements for CommentRefs
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,835 ▲8913.35 ▼0.861.65 ▼0.1346.51 ▲7.17
Dashboard /wp-admin2,241 ▲385.88 ▲0.00105.26 ▼4.7040.00 ▼1.29
Posts /wp-admin/edit.php2,120 ▲202.00 ▼0.0137.52 ▼1.3232.87 ▼0.24
Add New Post /wp-admin/post-new.php1,543 ▲1223.55 ▲0.44654.01 ▼32.5058.48 ▼0.16
Media Library /wp-admin/upload.php1,420 ▲174.26 ▲0.05105.40 ▲2.1143.65 ▼2.10

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • Uninstall procedure had uncaught errors
    • > Deprecated in wp-content/plugins/comment-refs/inc/Api/Callbacks/AdminCallbacksCrefs.php+247
    Array and string offset access syntax with curly braces is deprecated
  • Zombie WordPress options detected upon uninstall: 9 options
    • db_upgraded
    • theysaidso_admin_options
    • crefs_get_ten_posts
    • widget_recent-comments
    • crefs_get_dofollow
    • widget_theysaidso_widget
    • crefs_post_type
    • can_compress_scripts
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please take a closer look at the following
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/comment-refs/commentrefs.php
  • 7× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function settings_errors() in wp-content/plugins/comment-refs/templates/admin.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'Inc\\Base\\ControlerCrefs' not found in wp-content/plugins/comment-refs/inc/Pages/AdminCrefs.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/comment-refs/uninstall.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'Inc\\Base\\ControlerCrefs' not found in wp-content/plugins/comment-refs/inc/Base/EnqueueCrefs.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'Inc\\Base\\ControlerCrefs' not found in wp-content/plugins/comment-refs/inc/Base/SettingLinksCrefs.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'Inc\\Base\\ControlerCrefs' not found in wp-content/plugins/comment-refs/inc/Api/Callbacks/AdminCallbacksCrefs.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'Inc\\Base\\ControlerCrefs' not found in wp-content/plugins/comment-refs/inc/Base/CommentCrefs.php:11

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

readme.txt 88% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
These attributes need to be fixed:
  • Contributors: Plugin contributors field is missing
  • Requires php: Invalid version format
You can look at the official readme.txt

comment-refs/commentrefs.php 85% from 13 tests

The main PHP script in "CommentRefs" version 1.0.0 is automatically included on every request by WordPress
You should first fix the following items:
  • Text Domain: The text domain name must use dashes instead of underscores, and it must be lowercase
  • Main file name: The principal plugin file should be the same as the plugin slug ("comment-refs.php" instead of "commentrefs.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Good job! No executable or dangerous file extensions detected2,063 lines of code in 28 files:
LanguageFilesBlank linesComment linesLines of code
PHP228106011,296
JavaScript242198546
CSS2392198
JSON20023

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.69
Average class complexity23.00
▷ Minimum class complexity1.00
▷ Maximum class complexity141.00
Average method complexity4.45
▷ Minimum method complexity1.00
▷ Maximum method complexity33.00
Code structure
Namespaces6
Interfaces0
Traits0
Classes13
▷ Abstract classes00.00%
▷ Concrete classes13100.00%
▷ Final classes17.69%
Methods84
▷ Static methods89.52%
▷ Public methods8297.62%
▷ Protected methods00.00%
▷ Private methods22.38%
Functions4
▷ Named functions375.00%
▷ Anonymous functions125.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

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
4 PNG files occupy 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/facebook.png0.30KB0.23KB▼ 23.23%
assets/images/google.png0.46KB0.39KB▼ 14.77%
assets/images/linkedin.png0.35KB0.28KB▼ 19.50%
assets/images/twitter.png0.38KB0.31KB▼ 17.53%