78% cs-likes-counter

Code Review | CS Likes Counter

WordPress plugin CS Likes Counter scored78%from 54 tests.

About plugin

  • Plugin page: cs-likes-counter
  • Plugin version: 1.0.6
  • PHP version: 7.4.16
  • WordPress compatibility: 3.9-4.7.4
  • WordPress version: 6.3.1
  • First release: Apr 6, 2016
  • Latest release: Nov 12, 2018
  • Number of updates: 32
  • Update frequency: every 29.7 days
  • Top authors: bykaVBS (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

300+ active /2,237 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.02MB] [CPU: ▼7.49ms] Passed 4 tests

An overview of server-side resources used by CS Likes Counter
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0331.84 ▼12.54
Dashboard /wp-admin3.32 ▲0.0242.77 ▼5.17
Posts /wp-admin/edit.php3.37 ▲0.0249.01 ▲2.51
Add New Post /wp-admin/post-new.php5.91 ▲0.0278.99 ▼14.39
Media Library /wp-admin/upload.php3.24 ▲0.0232.87 ▲2.16

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 13 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_theysaidso_widget
db_upgraded
can_compress_scripts
widget_recent-posts
widget_recent-comments

Browser metrics Passed 4 tests

A check of browser resources used by CS Likes Counter
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,890 ▲15513.66 ▼0.667.89 ▲5.8736.78 ▼7.10
Dashboard /wp-admin2,206 ▲214.88 ▲0.00111.46 ▲3.8543.91 ▼0.28
Posts /wp-admin/edit.php2,089 ▼02.05 ▲0.0140.66 ▲3.7734.89 ▼1.10
Add New Post /wp-admin/post-new.php6,309 ▲4,79522.09 ▲4.52895.00 ▲204.3964.65 ▲6.50
Media Library /wp-admin/upload.php1,388 ▼34.24 ▲0.0699.26 ▼3.1141.86 ▼1.62

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded

Smoke tests 50% 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 0% 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
Almost there! Just fix the following items
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/cs-likes-counter/js/jquery-notice/index.php
  • 5× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Warning
      include(): Failed opening '../includes/footer.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/cs-likes-counter/js/jquery-notice/index.php on line 92
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/cs-likes-counter/cs-likes-counter.php:19
    • > PHP Warning
      include(../includes/footer.php): failed to open stream: No such file or directory in wp-content/plugins/cs-likes-counter/js/jquery-notice/index.php on line 92
    • > PHP Warning
      include(): Failed opening '../includes/header.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/cs-likes-counter/js/jquery-notice/index.php on line 82
    • > PHP Warning
      include(../includes/header.php): failed to open stream: No such file or directory in wp-content/plugins/cs-likes-counter/js/jquery-notice/index.php on line 82

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
3 plugin tags: likes, dislikes, likes counter

cs-likes-counter/cs-likes-counter.php 92% from 13 tests

The entry point to "CS Likes Counter" version 1.0.6 is a PHP file that has certain tags in its header comment area
Please take the time to fix the following:
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Success! There were no dangerous files found in this plugin528 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP210271287
JavaScript22132110
CSS23082
PO File1131348
XML1001

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity29.00
▷ Minimum class complexity29.00
▷ Maximum class complexity29.00
Average method complexity3.00
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods14
▷ Static methods321.43%
▷ Public methods14100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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
3 compressed PNG files occupy 0.00MB
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
img/like.png0.44KB0.48KB0.00%
img/icons.png1.59KB1.92KB0.00%
img/dislike.png0.44KB0.48KB0.00%