10% favorite-post

Code Review | Favorite Post

WordPress plugin Favorite Post scored10%from 54 tests.

About plugin

  • Plugin page: favorite-post
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-5.4
  • WordPress version: 6.3.1
  • First release: Aug 17, 2013
  • Latest release: Mar 14, 2020
  • Number of updates: 4
  • Update frequency: every 600.3 days
  • Top authors: tareq1988 (100%)

Code review

54 tests

User reviews

6 reviews

Install metrics

200+ active /6,983 total downloads

Benchmarks

Plugin footprint 23% 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
  • The plugin cannot be installed
    • > Deprecated in wp-content/plugins/favorite-post/favorite-post-widget.php+109
    Function create_function() is deprecated

Server metrics [RAM: ▼1.96MB] [CPU: ▼52.55ms] Passed 4 tests

An overview of server-side resources used by Favorite Post
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.03 ▼1.435.06 ▼35.87
Dashboard /wp-admin2.05 ▼1.265.25 ▼47.52
Posts /wp-admin/edit.php2.05 ▼1.316.76 ▼39.01
Add New Post /wp-admin/post-new.php2.05 ▼3.844.93 ▼87.78
Media Library /wp-admin/upload.php2.05 ▼1.184.87 ▼32.67

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 7 new files
Database: 1 new table, 7 new options
New tables
wp_favorite_post
New WordPress options
db_upgraded
theysaidso_admin_options
widget_recent-comments
widget_theysaidso_widget
widget_wedevs-favorite-post
can_compress_scripts
widget_recent-posts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Favorite Post
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,886 ▲15113.60 ▼0.775.01 ▲3.1142.10 ▼7.63
Dashboard /wp-admin2,206 ▲184.85 ▼0.95110.84 ▼3.6843.07 ▼1.14
Posts /wp-admin/edit.php2,089 ▼02.00 ▼0.0239.10 ▲4.4935.99 ▲3.78
Add New Post /wp-admin/post-new.php1,528 ▼723.16 ▼0.18639.12 ▼39.0456.98 ▲0.88
Media Library /wp-admin/upload.php1,391 ▲34.21 ▼0.0399.57 ▼7.1840.40 ▼5.56

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Please fix the following items
  • This plugin cannot be uninstalled
    • > Deprecated in wp-content/plugins/favorite-post/favorite-post-widget.php+109
    Function create_function() is deprecated
  • Zombie tables were found after uninstall: 1 table
    • wp_favorite_post
  • Zombie WordPress options were found after uninstall: 7 options
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts
    • widget_wedevs-favorite-post
    • theysaidso_admin_options
    • db_upgraded
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for 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 | 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
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/favorite-post/favorite-post-widget.php:8

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 errors were detected

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
3 plugin tags: favorite, favorite post, bookmark

favorite-post/favorite-post.php Passed 13 tests

The primary PHP file in "Favorite Post" version 1.0 is used by WordPress to initiate all plugin functionality
19 characters long description:
Favorite your posts

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 plugin287 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP288207223
JavaScript116838
CSS13026

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.19
Average class complexity10.00
▷ Minimum class complexity6.00
▷ Maximum class complexity14.00
Average method complexity1.95
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods19
▷ Static methods15.26%
▷ Public methods19100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
images/stars16.png2.05KB1.52KB▼ 26.05%