83% techvila-image-optimization-and-cdn

Code Review | Techvila image optimization and CDN

WordPress plugin Techvila image optimization and CDN scored83%from 54 tests.

About plugin

  • Plugin page: techvila-image-op...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Jul 28, 2022
  • Latest release: Jan 10, 2023
  • Number of updates: 9
  • Update frequency: every 18.6 days
  • Top authors: ruhulamin (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /200 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
The plugin installed gracefully, with no errors

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

Server-side resources used by Techvila image optimization and CDN
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0335.25 ▼12.50
Dashboard /wp-admin3.31 ▲0.0146.42 ▼1.97
Posts /wp-admin/edit.php3.36 ▲0.0144.30 ▼5.43
Add New Post /wp-admin/post-new.php5.89 ▲0.0180.53 ▼13.26
Media Library /wp-admin/upload.php3.24 ▲0.0136.62 ▼1.89

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-posts
db_upgraded
can_compress_scripts

Browser metrics Passed 4 tests

Checking browser requirements for Techvila image optimization and CDN
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,787 ▲4114.47 ▲0.181.22 ▼0.6310.27 ▼26.40
Dashboard /wp-admin2,206 ▲155.89 ▲0.96103.46 ▼1.8838.62 ▼3.69
Posts /wp-admin/edit.php2,089 ▼02.05 ▲0.0633.71 ▼5.5235.08 ▲1.56
Add New Post /wp-admin/post-new.php1,537 ▲423.28 ▲0.18625.54 ▼58.8363.42 ▲3.74
Media Library /wp-admin/upload.php1,388 ▼04.21 ▼0.0098.66 ▼5.8944.07 ▼0.20

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts
    • 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 | 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
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_site_url() in wp-content/plugins/techvila-image-optimization-and-cdn/index.php: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)
No browser issues were found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
These attributes need your attention:
  • Screenshots: Screenshot #1 (Not Available) image not found
You can look at the official readme.txt

techvila-image-optimization-and-cdn/index.php 85% from 13 tests

Analyzing the main PHP file in "Techvila image optimization and CDN" version 1.0.0
The following require your attention:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("techvila-image-optimization-and-cdn.php" instead of "index.php")
  • 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 plugin36 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP171436

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.44
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%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.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