84% bake-posts

Code Review | Bake Posts

WordPress plugin Bake Posts scored84%from 54 tests.

About plugin

  • Plugin page: bake-posts
  • Plugin version: 2.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-5.2.1
  • WordPress version: 6.3.1
  • First release: Aug 8, 2014
  • Latest release: Jun 11, 2019
  • Number of updates: 30
  • Update frequency: every 59.0 days
  • Top authors: wpnaga (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

60+ active /2,745 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.04MB] [CPU: ▼7.07ms] Passed 4 tests

Server-side resources used by Bake Posts
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0336.17 ▼4.07
Dashboard /wp-admin3.34 ▲0.0447.30 ▼4.73
Posts /wp-admin/edit.php3.40 ▲0.0457.52 ▲6.76
Add New Post /wp-admin/post-new.php5.92 ▲0.0482.84 ▼20.73
Media Library /wp-admin/upload.php3.27 ▲0.0440.12 ▲1.26

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Bake Posts
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,840 ▲9413.60 ▼0.984.31 ▲2.6537.57 ▼6.00
Dashboard /wp-admin2,224 ▲365.99 ▲1.13112.32 ▼0.8886.48 ▲46.77
Posts /wp-admin/edit.php2,101 ▲151.99 ▼0.0236.13 ▼2.0128.56 ▼4.08
Add New Post /wp-admin/post-new.php1,681 ▲14821.82 ▼1.60762.35 ▲64.1856.76 ▼7.16
Media Library /wp-admin/upload.php1,397 ▲94.23 ▼0.01103.08 ▼7.3779.55 ▲27.41

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Almost there! Just fix the following items
  • 2× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/bake-posts/settings.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/bake-posts/bake-posts.php:119

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

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
10 plugin tags: id, limit, excerpt, content, tag post...

bake-posts/bake-posts.php Passed 13 tests

The main PHP file in "Bake Posts" ver. 2.2 adds more information about the plugin and also serves as the entry point for this plugin
69 characters long description:
Plugin to display Posts on selected Categories,Tags and Recent posts.

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
Success! There were no dangerous files found in this plugin372 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP23712253
JavaScript1155119

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.34
Average class complexity25.00
▷ Minimum class complexity25.00
▷ Maximum class complexity25.00
Average method complexity5.80
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods5
▷ Static methods00.00%
▷ Public methods5100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions7
▷ Named functions7100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
4 PNG files occupy 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/icon.png1.68KB0.86KB▼ 48.92%
images/category.png0.95KB0.30KB▼ 68.18%
images/time.png0.87KB0.25KB▼ 71.81%
images/author.png0.95KB0.33KB▼ 65.36%