74% simages

Code Review | Simages

WordPress plugin Simages scored74%from 54 tests.

About plugin

  • Plugin page: simages
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-4.2.2
  • WordPress version: 6.3.1
  • First release: Jan 26, 2015
  • Latest release: Jun 1, 2015
  • Number of updates: 4
  • Update frequency: every 32.0 days
  • Top authors: Simalam (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /640 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
This plugin's installer ran successfully

Server metrics [RAM: ▼1.21MB] [CPU: ▼42.89ms] Passed 4 tests

This is a short check of server-side resources used by Simages
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.76 ▼0.7113.04 ▼30.35
Dashboard /wp-admin2.80 ▼0.5017.29 ▼31.93
Posts /wp-admin/edit.php2.80 ▼0.5620.04 ▼25.42
Add New Post /wp-admin/post-new.php2.80 ▼3.0916.78 ▼83.86
Media Library /wp-admin/upload.php2.80 ▼0.4316.88 ▼18.36

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 5 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
can_compress_scripts
db_upgraded
widget_recent-posts
widget_theysaidso_widget
theysaidso_admin_options

Browser metrics Passed 4 tests

Simages: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,827 ▲6614.37 ▲0.011.97 ▼0.1239.70 ▼5.94
Dashboard /wp-admin2,198 ▲185.63 ▲0.0194.26 ▲5.0742.02 ▲0.70
Posts /wp-admin/edit.php2,106 ▲61.99 ▼0.0335.96 ▼0.9034.96 ▼0.39
Add New Post /wp-admin/post-new.php1,529 ▼823.17 ▲5.08674.41 ▲52.2057.61 ▼10.34
Media Library /wp-admin/upload.php1,403 ▲34.19 ▼0.03100.00 ▼3.6043.40 ▲1.92

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • This plugin did not uninstall without warnings or errors
    • > Notice in wp-content/plugins/simages/classes/simages.class.php+233
    Undefined index: width
  • 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 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% 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
Please take a closer look at the following
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/simages/init.php:30

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

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
2 plugin tags: srcset, responsive images

simages/init.php 92% from 13 tests

"Simages" version 1.1's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
You should first fix the following items:
  • Main file name: Name the main plugin file the same as the plugin slug ("simages.php" instead of "init.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Success! There were no dangerous files found in this plugin142 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP310061141
JavaScript1031

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity23.00
▷ Minimum class complexity23.00
▷ Maximum class complexity23.00
Average method complexity3.20
▷ Minimum method complexity1.00
▷ Maximum method complexity11.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods10
▷ Static methods10100.00%
▷ Public methods440.00%
▷ Protected methods00.00%
▷ Private methods660.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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 were not PNG files found in your plugin