84% dsense-like-posts

Code Review | Dsense Like Posts

WordPress plugin Dsense Like Posts scored84%from 54 tests.

About plugin

  • Plugin page: dsense-like-posts
  • Plugin version: 0.5
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.5.3
  • WordPress version: 6.3.1
  • First release: Feb 10, 2016
  • Latest release: Aug 14, 2016
  • Number of updates: 14
  • Update frequency: every 15.6 days
  • Top authors: amrinder146 (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

10+ active /1,257 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 gracefully, with no errors

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

A check of server-side resources used by Dsense Like Posts
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.77 ▲0.0452.15 ▲10.00
Dashboard /wp-admin3.59 ▼0.0452.00 ▼12.92
Posts /wp-admin/edit.php3.71 ▲0.0352.28 ▲0.48
Add New Post /wp-admin/post-new.php6.17 ▲0.0393.15 ▼15.78
Media Library /wp-admin/upload.php3.52 ▲0.0338.33 ▲2.75

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 15 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-comments
db_upgraded
widget_recent-posts
theysaidso_admin_options
can_compress_scripts

Browser metrics Passed 4 tests

Dsense Like Posts: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,922 ▲17613.47 ▼0.839.59 ▲7.4248.32 ▲5.29
Dashboard /wp-admin2,203 ▲235.57 ▼0.1597.72 ▲10.5744.89 ▲7.83
Posts /wp-admin/edit.php2,105 ▲52.02 ▼0.0436.16 ▼3.2032.31 ▼4.62
Add New Post /wp-admin/post-new.php1,555 ▲718.46 ▼4.73638.88 ▲10.2865.39 ▲15.92
Media Library /wp-admin/upload.php1,399 ▼44.22 ▲0.02100.35 ▼10.8542.41 ▼4.48

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
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following items
  • 2× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/dsense-like-posts/vendor/fontawesome/post-like.php:38
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/dsense-like-posts/post-like.php:26

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 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: posts, like posts, perfect, categories, related

dsense-like-posts/post-like.php 92% from 13 tests

The entry point to "Dsense Like Posts" version 0.5 is a PHP file that has certain tags in its header comment area
Please make the necessary changes and fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("dsense-like-posts.php" instead of "post-like.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
No dangerous file extensions were detected700 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
PHP28696485
CSS4112107
JavaScript40066
SVG10342

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.27
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%
Functions18
▷ Named functions18100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
PNG images were not found in this plugin