84% freebieselect-daily-free-content

Code Review | FreebieSelect

WordPress plugin FreebieSelect scored84%from 54 tests.

About plugin

  • Plugin page: freebieselect-dai...
  • Plugin version: 1.2.1
  • PHP version: 7.4.16
  • WordPress compatibility: 2.9.2-6.1.3
  • WordPress version: 6.3.1
  • First release: Jul 28, 2016
  • Latest release: Jul 11, 2023
  • Number of updates: 16
  • Update frequency: every 159.0 days
  • Top authors: freebieselect (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,071 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

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

This is a short check of server-side resources used by FreebieSelect
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0235.82 ▼1.47
Dashboard /wp-admin3.32 ▲0.0145.45 ▼1.41
Posts /wp-admin/edit.php3.37 ▲0.0147.00 ▼2.68
Add New Post /wp-admin/post-new.php5.90 ▲0.0282.48 ▼13.61
Media Library /wp-admin/upload.php3.24 ▲0.0136.12 ▲0.15
FreebieSelect /wp-admin/options-general.php?page=freebieselectadmin3.2128.90

Server storage [IO: ▲0.01MB] [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, 11 new options
New WordPress options
widget_recent-comments
widget_theysaidso_widget
freebieselectchecktime
can_compress_scripts
freebieselectwidth
theysaidso_admin_options
freebieselectlast
freebieselectfile
freebieselectdefault
widget_recent-posts
...

Browser metrics Passed 4 tests

This is an overview of browser requirements for FreebieSelect
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲6913.19 ▼1.191.70 ▼0.2240.88 ▼6.10
Dashboard /wp-admin2,204 ▲135.78 ▼0.12100.76 ▲0.6041.00 ▼2.64
Posts /wp-admin/edit.php2,093 ▲11.98 ▼0.0337.49 ▼2.8932.57 ▼5.81
Add New Post /wp-admin/post-new.php1,545 ▲2618.23 ▼4.96608.27 ▼36.5748.60 ▼14.93
Media Library /wp-admin/upload.php1,392 ▲74.21 ▲0.0291.57 ▼8.5340.41 ▼2.45
FreebieSelect /wp-admin/options-general.php?page=freebieselectadmin7722.0624.5425.54

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% 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 did not uninstall successfully, leaving 6 options in the database
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following items
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_basename() in wp-content/plugins/freebieselect-daily-free-content/freebieselect.php:11
    • > PHP Warning
      Use of undefined constant WP_PLUGIN_DIR - assumed 'WP_PLUGIN_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/freebieselect-daily-free-content/freebieselect.php on line 11

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration 93% 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
Attributes that need to be fixed:
  • Tags: Please reduce the number of tags, currently 12 tag instead of maximum 10
The official readme.txt is a good inspiration

freebieselect-daily-free-content/freebieselect.php 92% from 13 tests

The main file in "FreebieSelect" v. 1.2.1 serves as a complement to information provided in readme.txt and as the entry point to the plugin
It is important to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("freebieselect-daily-free-content.php" instead of "freebieselect.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Everything looks great! No dangerous files found in this plugin126 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1638126

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.16
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%
Functions12
▷ Named functions12100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
There were not PNG files found in your plugin