84% rng-ajaxlike

Code Review | rng-ajaxlike

WordPress plugin rng-ajaxlike scored84%from 54 tests.

About plugin

  • Plugin page: rng-ajaxlike
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.1
  • WordPress version: 6.3.1
  • First release: Mar 9, 2019
  • Latest release: May 8, 2019
  • Number of updates: 6
  • Update frequency: every 10.3 days
  • Top authors: asabagh (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active /749 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▼0.21MB] [CPU: ▼15.45ms] Passed 4 tests

An overview of server-side resources used by rng-ajaxlike
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.0935.07 ▼7.03
Dashboard /wp-admin3.43 ▲0.1351.26 ▲4.92
Posts /wp-admin/edit.php3.54 ▲0.1944.86 ▲1.71
Add New Post /wp-admin/post-new.php4.72 ▼1.1745.31 ▼55.32
Media Library /wp-admin/upload.php3.35 ▲0.1236.40 ▼1.14
Ajax Like Settings /wp-admin/options-general.php?page=ajaxlike-settings3.3232.35

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 23 new files
Database: no new tables, 7 new options
New WordPress options
can_compress_scripts
db_upgraded
widget_recent-comments
widget_theysaidso_widget
widget_rajl_mostliked_posts
theysaidso_admin_options
widget_recent-posts

Browser metrics Passed 4 tests

An overview of browser requirements for rng-ajaxlike
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,945 ▲17413.86 ▼0.735.64 ▲3.4044.92 ▼1.44
Dashboard /wp-admin2,243 ▲555.25 ▼0.62106.39 ▼22.2641.66 ▼5.45
Posts /wp-admin/edit.php2,138 ▲462.33 ▲0.3241.02 ▲1.4033.89 ▼3.70
Add New Post /wp-admin/post-new.php1,553 ▲1118.28 ▲0.12615.41 ▲10.7334.73 ▼15.71
Media Library /wp-admin/upload.php1,425 ▲374.45 ▲0.2398.05 ▼4.4143.48 ▼0.68
Ajax Like Settings /wp-admin/options-general.php?page=ajaxlike-settings9962.3842.7828.98

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Please fix the following items
  • The uninstall procedure has failed, leaving 6 options in the database
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget

Smoke tests 75% from 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 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
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 esc_html__() in wp-content/plugins/rng-ajaxlike/includes/translate.php:2

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

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
3 plugin tags: rng-ajaxlike, ajaxlike, like-button

rng-ajaxlike/rng-ajaxLike.php 85% from 13 tests

"rng-ajaxlike" version 1.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
You should first fix the following items:
  • Description: Please don't use more than 140 characters for the plugin description (currently 192 characters long)
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("rng-ajaxlike.php" instead of "rng-ajaxLike.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
Success! There were no dangerous files found in this plugin826 lines of code in 17 files:
LanguageFilesBlank linesComment linesLines of code
PHP965142466
CSS3819202
PO File1242675
JavaScript21048
Markdown19023
SVG10012

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.31
Average class complexity16.00
▷ Minimum class complexity1.00
▷ Maximum class complexity26.00
Average method complexity2.88
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods32
▷ Static methods13.12%
▷ Public methods3196.88%
▷ Protected methods00.00%
▷ Private methods13.12%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants6
▷ Global constants6100.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
There are no PNG files in this plugin