10% my-favorite-cars

Code Review | My Favorite Car

WordPress plugin My Favorite Car scored10%from 54 tests.

About plugin

  • Plugin page: my-favorite-cars
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 2.0.2-3.4.2
  • WordPress version: 6.3.1
  • First release: Dec 1, 2012
  • Latest release: Dec 16, 2012
  • Number of updates: 7
  • Update frequency: every 2.3 days
  • Top authors: mitegvg (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /961 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
It is recommended to fix the following installer errors
  • This plugin did not install gracefully
    • > Notice in wp-content/plugins/my-favorite-cars/my-favorite-cars.php+20
    Undefined index: size

Server metrics [RAM: ▼1.97MB] [CPU: ▼60.88ms] Passed 4 tests

Analyzing server-side resources used by My Favorite Car
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.03 ▼1.444.45 ▼38.19
Dashboard /wp-admin2.05 ▼1.305.48 ▼61.47
Posts /wp-admin/edit.php2.05 ▼1.315.09 ▼44.63
Add New Post /wp-admin/post-new.php2.05 ▼3.845.95 ▼99.21
Media Library /wp-admin/upload.php2.05 ▼1.184.88 ▼29.41

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 11 new files
Database: no new tables, 9 new options
New WordPress options
widget_mfc
carmusing_activation
widget_recent-posts
widget_recent-comments
theysaidso_admin_options
can_compress_scripts
widget_theysaidso_widget
carmusing_userid
db_upgraded

Browser metrics Passed 4 tests

My Favorite Car: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,921 ▲16013.83 ▼0.738.78 ▲7.0446.77 ▲7.83
Dashboard /wp-admin2,221 ▲405.56 ▼0.1085.52 ▼23.7969.26 ▲25.34
Posts /wp-admin/edit.php2,129 ▲291.99 ▼0.0138.13 ▼5.1435.18 ▲0.01
Add New Post /wp-admin/post-new.php1,568 ▲4218.35 ▼5.29722.08 ▲28.1362.03 ▼6.29
Media Library /wp-admin/upload.php1,429 ▲294.22 ▼0.02100.03 ▼11.7573.75 ▲26.71

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/my-favorite-cars/my-favorite-cars.php+20
    Undefined index: size
  • Zombie WordPress options were found after uninstall: 9 options
    • can_compress_scripts
    • carmusing_userid
    • carmusing_activation
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments
    • widget_mfc
    • widget_theysaidso_widget
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
The following issues need your attention
  • 2× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/my-favorite-cars/my-favorite-cars.php:62
    • > PHP Notice
      Undefined index: size in wp-content/plugins/my-favorite-cars/my-favorite-cars.php on line 20

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
5 plugin tags: favorite cars, list, cars, cool cars, used cars

my-favorite-cars/my-favorite-cars.php Passed 13 tests

The main file in "My Favorite Car" v. 1.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
48 characters long description:
Select and display a list of your favorite cars.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Everything looks great! No dangerous files found in this plugin672 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP3126108480
CSS2220192

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.39
Average class complexity7.50
▷ Minimum class complexity1.00
▷ Maximum class complexity14.00
Average method complexity4.25
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions21
▷ Named functions21100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
4 PNG files occupy 0.50MB with 0.32MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/mfc-icon.png1.27KB0.48KB▼ 62.35%
images/not-available.png4.88KB2.74KB▼ 43.71%
screenshot-1.png504.34KB150.16KB▼ 70.23%
images/arrow.png0.99KB0.21KB▼ 79.19%