78% ricg-responsive-images

Code Review | RICG Responsive Images

WordPress plugin RICG Responsive Images scored78%from 54 tests.

About plugin

  • Plugin page: ricg-responsive-i...
  • Plugin version: 3.1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.4
  • WordPress version: 6.3.1
  • First release: Jan 17, 2015
  • Latest release: Dec 17, 2015
  • Number of updates: 44
  • Update frequency: every 7.7 days
  • Top authors: tevko (100%)

Code review

54 tests

User reviews

20 reviews

Install metrics

5,000+ active /150,539 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▲0.04MB] [CPU: ▼8.18ms] Passed 4 tests

Analyzing server-side resources used by RICG Responsive Images
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0449.33 ▲5.47
Dashboard /wp-admin3.35 ▲0.0448.25 ▼1.91
Posts /wp-admin/edit.php3.40 ▲0.0446.89 ▼9.04
Add New Post /wp-admin/post-new.php5.93 ▲0.0485.44 ▼21.21
Media Library /wp-admin/upload.php3.27 ▲0.0434.11 ▼0.54

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 12 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-comments
can_compress_scripts
db_upgraded

Browser metrics Passed 4 tests

A check of browser resources used by RICG Responsive Images
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,794 ▲3314.35 ▲0.062.46 ▲0.8044.70 ▲3.60
Dashboard /wp-admin2,192 ▲125.57 ▼0.0892.17 ▲3.2340.70 ▼4.07
Posts /wp-admin/edit.php2,100 ▼02.04 ▲0.0437.19 ▲0.3633.26 ▼0.89
Add New Post /wp-admin/post-new.php1,526 ▼223.59 ▲0.49687.50 ▼9.3151.62 ▲1.27
Media Library /wp-admin/upload.php1,400 ▼04.18 ▼0.0698.79 ▼20.9245.39 ▼4.41

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
The following items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded
    • widget_theysaidso_widget
    • 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)
Good news, no errors were detected

SRP 0% 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
The following issues need your attention
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/ricg-responsive-images/wp-tevko-responsive-images.php
  • 7× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/ricg-responsive-images/wp-tevko-core-functions.php:372
    • > PHP Fatal error
      Uncaught Error: Class 'Imagick' not found in wp-content/plugins/ricg-responsive-images/class-respimg.php:25
    • > PHP Warning
      Use of undefined constant WPINC - assumed 'WPINC' (this will throw an Error in a future version of PHP) in wp-content/plugins/ricg-responsive-images/class-wp-image-editor-respimg.php on line 10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/ricg-responsive-images/wp-tevko-deprecated-functions.php:317
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHWPINC/class-wp-image-editor.php' (include_path='.:/usr/share/php') in wp-content/plugins/ricg-responsive-images/class-wp-image-editor-respimg.php on line 10
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/ricg-responsive-images/class-wp-image-editor-respimg.php on line 10
    • > PHP Warning
      require_once(ABSPATHWPINC/class-wp-image-editor.php): failed to open stream: No such file or directory in wp-content/plugins/ricg-responsive-images/class-wp-image-editor-respimg.php on line 10

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
5 plugin tags: images, picturefill, srcset, responsive images, responsive

ricg-responsive-images/wp-tevko-responsive-images.php 92% from 13 tests

The main file in "RICG Responsive Images" v. 3.1.1 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please make the necessary changes and fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("ricg-responsive-images.php" instead of "wp-tevko-responsive-images.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Everything looks great! No dangerous files found in this plugin1,116 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP5195629686
Markdown11970392
JavaScript2121828
JSON10010

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.54
Average class complexity30.50
▷ Minimum class complexity28.00
▷ Maximum class complexity33.00
Average method complexity10.83
▷ Minimum method complexity3.00
▷ Maximum method complexity26.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods6
▷ Static methods00.00%
▷ Public methods6100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions23
▷ Named functions23100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
There were not PNG files found in your plugin