10% catconvert

Code Review | Catconvert

WordPress plugin Catconvert scored10%from 54 tests.

About plugin

  • Plugin page: catconvert
  • Plugin version: 0.10
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-3.5
  • WordPress version: 6.3.1
  • First release: Dec 29, 2013
  • Latest release: May 24, 2014
  • Number of updates: 29
  • Update frequency: every 5.0 days
  • Top authors: catconvert (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active /3,807 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
It is recommended to fix the following installer errors
  • This plugin did not install gracefully
    • > Warning in wp-content/plugins/catconvert/Catconvert_Plugin.php+33
    count(): Parameter must be an array or an object that implements Countable

Server metrics [RAM: ▼1.94MB] [CPU: ▼51.16ms] Passed 4 tests

A check of server-side resources used by Catconvert
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.04 ▼1.425.00 ▼38.56
Dashboard /wp-admin2.06 ▼1.245.59 ▼41.30
Posts /wp-admin/edit.php2.06 ▼1.295.95 ▼41.41
Add New Post /wp-admin/post-new.php2.06 ▼3.826.83 ▼83.37
Media Library /wp-admin/upload.php2.06 ▼1.177.65 ▼24.81

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 16 new files
Database: no new tables, 13 new options
New WordPress options
db_upgraded
widget_theysaidso_widget
Catconvert_Plugin_LinkPosition
Catconvert_Plugin_LinkCssClass
Catconvert_Plugin__version
theysaidso_admin_options
Catconvert_Plugin__installed
Catconvert_Plugin_Categories
Catconvert_Plugin_ContainerCssClass
widget_recent-posts
...

Browser metrics Passed 4 tests

Catconvert: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,817 ▲8213.57 ▼1.101.83 ▼0.2641.24 ▼3.48
Dashboard /wp-admin2,219 ▲315.85 ▼0.05100.94 ▼2.2872.82 ▲29.02
Posts /wp-admin/edit.php2,105 ▲162.01 ▲0.0239.69 ▼1.8435.24 ▼1.87
Add New Post /wp-admin/post-new.php1,680 ▲13822.21 ▲4.18671.45 ▲82.3160.88 ▲8.53
Media Library /wp-admin/upload.php1,404 ▲134.20 ▼0.0496.99 ▼3.6247.58 ▼0.87

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
  • The plugin did not uninstall gracefully
    • > User notice in wp-includes/functions.php+5905
    Function wp_enqueue_style was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the catconvert-style handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • This plugin does not fully uninstall, leaving 13 options in the database
    • Catconvert_Plugin__installed
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments
    • Catconvert_Plugin_LinkCssClass
    • Catconvert_Plugin__version
    • db_upgraded
    • widget_theysaidso_widget
    • Catconvert_Plugin_LinkPosition
    • Catconvert_Plugin_LinkText
    • ...

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
The following issues need your attention
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_basename() in wp-content/plugins/catconvert/catconvert.php:47

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
These attributes need your attention:
  • Donate link: Invalid URI found ("")
  • Tags: Please reduce the number of tags, currently 56 tag instead of maximum 10
The official readme.txt might help

catconvert/catconvert.php 92% from 13 tests

The entry point to "Catconvert" version 0.10 is a PHP file that has certain tags in its header comment area
You should first fix the following items:
  • Description: Please don't use more than 140 characters for the plugin description (currently 143 characters long)

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
No dangerous file extensions were detected619 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP8213540607
CSS13012

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.31
Average class complexity12.17
▷ Minimum class complexity1.00
▷ Maximum class complexity40.00
Average method complexity1.92
▷ Minimum method complexity1.00
▷ Maximum method complexity20.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes6
▷ Abstract classes233.33%
▷ Concrete classes466.67%
▷ Final classes00.00%
Methods75
▷ Static methods00.00%
▷ Public methods4661.33%
▷ Protected methods2938.67%
▷ Private methods00.00%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants00.00%
▷ Class constants2100.00%
▷ Public constants2100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
3 PNG files occupy 0.72MB with 0.33MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assests/screenshot-1.png507.65KB171.24KB▼ 66.27%
img/icon.png0.99KB1.03KB0.00%
assests/screenshot-2.png231.37KB66.07KB▼ 71.45%