83% wordpress-sinhala-comments

Code Review | Wordpress Sinhala Comments

WordPress plugin Wordpress Sinhala Comments scored 83% from 54 tests.

About plugin

  • Plugin page: wordpress-sinhala...
  • Plugin version: 4.1
  • PHP version: 7.4.16
  • WordPress compatibility: 2.7-6.2
  • WordPress version: 6.3.1
  • First release: Aug 13, 2010
  • Latest release: Mar 31, 2023
  • Number of updates: 48
  • Update frequency: every 96.1 days
  • Top authors: iroshan (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 2,900 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼3.02ms] Passed 4 tests

An overview of server-side resources used by Wordpress Sinhala Comments
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0138.82 ▼3.60
Dashboard /wp-admin3.31 ▲0.0148.20 ▼7.42
Posts /wp-admin/edit.php3.36 ▲0.0143.99 ▼1.06
Add New Post /wp-admin/post-new.php5.89 ▲0.0193.00 ▼0.00
Media Library /wp-admin/upload.php3.23 ▲0.0037.09 ▲2.14

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 8 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
theysaidso_admin_options
db_upgraded
can_compress_scripts
widget_recent-posts
widget_recent-comments

Browser metrics Passed 4 tests

This is an overview of browser requirements for Wordpress Sinhala Comments
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,003 ▲26813.97 ▼0.6110.91 ▲9.0536.83 ▼10.71
Dashboard /wp-admin2,209 ▲184.83 ▼1.05102.75 ▼13.5535.63 ▼9.23
Posts /wp-admin/edit.php2,089 ▲32.01 ▲0.0136.08 ▲0.9033.34 ▼2.53
Add New Post /wp-admin/post-new.php1,538 ▲2423.20 ▲5.67601.91 ▼80.9351.88 ▼4.87
Media Library /wp-admin/upload.php1,391 ▲64.20 ▼0.03103.45 ▲3.9739.71 ▼1.65

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please take a closer look at the following
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wordpress-sinhala-comments/sinhala_comments.php:15

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Attributes that need to be fixed:
  • Screenshots: Add images for these screenshots: #1 (Simply click on the "සිංහලෙන් comments" button of the comment box.), #2 (Type your comment in singlish in the "Singlish Box".), #3 (After submit the comment you can see the comment in sinhala.)
  • Plugin Name: Write the name of your plugin instead of "Plugin Name" on the first line ( === wordpress-sinhala-comments === )
The official readme.txt might help

wordpress-sinhala-comments/sinhala_comments.php 92% from 13 tests

"Wordpress Sinhala Comments" version 4.1's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please take the time to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("wordpress-sinhala-comments.php" instead of "sinhala_comments.php")

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
Everything looks great! No dangerous files found in this plugin194 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript26753138
CSS111842
PHP171114

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.00
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
3 PNG files occupy 0.23MB with 0.14MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-2.png99.84KB36.95KB▼ 62.99%
screenshot-3.png82.28KB32.96KB▼ 59.94%
screenshot-1.png57.30KB22.37KB▼ 60.95%