68% sravnitel

Code Review | Sravnitel

WordPress plugin Sravnitel scored 68% from 54 tests.

About plugin

  • Plugin page: sravnitel
  • Plugin version: 1.3
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5.5-4.7.2
  • WordPress version: 6.3.1
  • First release: Jan 21, 2017
  • Latest release: Feb 27, 2017
  • Number of updates: 16
  • Update frequency: every 2.0 days
  • Top authors: okdzhimiev (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active / 1,391 total downloads

Benchmarks

Plugin footprint 65% 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: ▼1.23MB] [CPU: ▼41.70ms] Passed 4 tests

Analyzing server-side resources used by Sravnitel
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.75 ▼0.7112.05 ▼26.02
Dashboard /wp-admin2.78 ▼0.5215.99 ▼29.69
Posts /wp-admin/edit.php2.78 ▼0.5718.61 ▼30.45
Add New Post /wp-admin/post-new.php2.78 ▼3.1016.69 ▼80.64
Media Library /wp-admin/upload.php2.78 ▼0.4412.74 ▼18.71

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 14 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_theysaidso_widget
widget_recent-comments
theysaidso_admin_options
can_compress_scripts
widget_recent-posts

Browser metrics Passed 4 tests

Sravnitel: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,892 ▲13513.69 ▼0.605.75 ▲3.7539.76 ▼7.62
Dashboard /wp-admin2,206 ▲215.83 ▼0.0496.91 ▼5.5538.08 ▼7.63
Posts /wp-admin/edit.php2,089 ▼02.02 ▲0.0339.00 ▼1.7635.40 ▼0.35
Add New Post /wp-admin/post-new.php1,519 ▼2323.25 ▲4.99605.37 ▲11.1660.22 ▲10.08
Media Library /wp-admin/upload.php1,388 ▼34.28 ▲0.0793.34 ▼10.1841.99 ▲0.20

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
It is recommended to fix the following
  • This plugin did not uninstall without warnings or errors
    • > Warning in wp-content/plugins/sravnitel/inc/shortcode.php+132
    Use of undefined constant sravnitel_shortcode - assumed 'sravnitel_shortcode' (this will throw an Error in a future version of PHP)
  • The uninstall procedure has failed, leaving 6 options in the database
    • can_compress_scripts
    • theysaidso_admin_options
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments

Smoke tests 50% 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 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
The following issues need your attention
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/sravnitel/sravnitel.php
  • 1× 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/sravnitel/inc/enqueue.php:30

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 81% from 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
These attributes need your attention:
  • Plugin Name: Write the name of your plugin instead of "Plugin Name" on the first line ( === sravnitel === )
  • Screenshots: Add descriptions for screenshots #2, #3 in sravnitel/assets to your readme.txt
  • Tags: Please delete some tags, you are using 13 tag instead of maximum 10
You can take inspiration from this readme.txt

sravnitel/sravnitel.php Passed 13 tests

The main file in "Sravnitel" v. 1.3 serves as a complement to information provided in readme.txt and as the entry point to the plugin
77 characters long description:
Before-After overlayed image comparison plugin with: slider, zoom, 2+ images.

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
No dangerous file extensions were detected666 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript115070466
PHP3389095
Markdown124081
CSS15124

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.15
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%
Functions4
▷ Named functions4100.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
5 PNG files occupy 0.06MB with 0.04MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/elphel-logo.png10.97KB2.77KB▼ 74.78%
assets/images/handle_gray_1.png12.93KB4.33KB▼ 66.55%
assets/images/handle_blue.png11.91KB5.76KB▼ 51.64%
assets/images/handle_gray.png13.54KB5.93KB▼ 56.24%
assets/images/handle_green.png11.64KB5.95KB▼ 48.87%