84% converter

Code Review | Converter

WordPress plugin Converter scored84%from 54 tests.

About plugin

  • Plugin page: converter
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 2.7-3.5.2
  • WordPress version: 6.3.1
  • First release: Jun 25, 2013
  • Latest release: Jun 25, 2013
  • Number of updates: 3
  • Update frequency: N/A
  • Top authors: ajayver (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,478 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed successfully, without throwing any errors or notices

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

A check of server-side resources used by Converter
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0333.77 ▼7.32
Dashboard /wp-admin3.33 ▼0.0145.42 ▼19.14
Posts /wp-admin/edit.php3.38 ▲0.0346.48 ▲5.93
Add New Post /wp-admin/post-new.php5.91 ▲0.0392.50 ▼8.90
Media Library /wp-admin/upload.php3.26 ▲0.0335.20 ▲1.63

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

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

Browser metrics Passed 4 tests

A check of browser resources used by Converter
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.25 ▼1.121.60 ▼0.0539.09 ▼5.12
Dashboard /wp-admin2,206 ▲214.85 ▼1.03105.30 ▲2.5238.14 ▲2.59
Posts /wp-admin/edit.php2,089 ▼32.02 ▲0.0135.31 ▼6.1034.98 ▼1.62
Add New Post /wp-admin/post-new.php1,542 ▲2118.19 ▼4.87627.01 ▲12.9254.37 ▲0.71
Media Library /wp-admin/upload.php1,382 ▼94.26 ▲0.08100.81 ▼5.6243.74 ▼4.06

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
  • Zombie WordPress options detected upon uninstall: 7 options
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_converter_widget
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting 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 take a closer look at the following
  • 2× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/converter/widget.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/converter/converter.php:13

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
These attributes need to be fixed:
  • Screenshots: Please add an image for screenshot #1 (This is how the widget looks in twentytwelve theme with no styling.)
You can take inspiration from this readme.txt

converter/converter.php Passed 13 tests

The main PHP file in "Converter" ver. 1.0 adds more information about the plugin and also serves as the entry point for this plugin
71 characters long description:
This plugin adds a widget that allows users to convert different values

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
There were no executable files found in this plugin129 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP23844129

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.27
Average class complexity14.00
▷ Minimum class complexity14.00
▷ Maximum class complexity14.00
Average method complexity1.80
▷ Minimum method complexity1.00
▷ Maximum method complexity2.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods6
▷ Static methods00.00%
▷ Public methods6100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions00.00%
▷ Anonymous functions1100.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
1 PNG file occupies 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png5.84KB3.47KB▼ 40.63%