78% simple-blog

Code Review | Simple Blog

WordPress plugin Simple Blog scored 78% from 54 tests.

About plugin

  • Plugin page: simple-blog
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress version: 5.8.1
  • First release: Sep 22, 2016
  • Latest release: Sep 22, 2016
  • Number of updates: 36
  • Update frequency: N/A
  • Top authors: vikashsrivastava1111989 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

60+ active / 2,991 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
This plugin's installer ran successfully

Server metrics [RAM: ▼1.75MB] [CPU: ▼224.53ms] Passed 4 tests

This is a short check of server-side resources used by Simple Blog
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /1.88 ▼0.955.31 ▼30.85
Dashboard /wp-admin1.90 ▼1.156.62 ▼43.73
Posts /wp-admin/edit.php1.90 ▼1.216.37 ▼38.66
Add New Post /wp-admin/post-new.php1.90 ▼3.537.03 ▼784.86
Media Library /wp-admin/upload.php1.90 ▼1.106.24 ▼28.30
Add New Blog Post /wp-admin/post-new.php?post_type=blog1.905.69
Blog Category /wp-admin/edit-tags.php?taxonomy=all-blog&post_type=blog1.907.17
Blog /wp-admin/edit.php?post_type=blog1.905.89

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 66 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

An overview of browser requirements for Simple Blog
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,875 ▲30316.33 ▲0.3013.85 ▲2.4945.04 ▼8.69
Dashboard /wp-admin3,021 ▲906.17 ▲0.21150.68 ▼45.57113.64 ▼3.23
Posts /wp-admin/edit.php2,790 ▲512.75 ▲0.0367.38 ▼1.6887.98 ▼4.96
Add New Post /wp-admin/post-new.php1,651 ▲15121.47 ▲3.11317.52 ▼104.25104.74 ▼5.33
Media Library /wp-admin/upload.php1,861 ▲545.13 ▲0.09155.28 ▲9.92120.68 ▼1.31
Add New Blog Post /wp-admin/post-new.php?post_type=blog4,19410.70286.75164.20
Blog Category /wp-admin/edit-tags.php?taxonomy=all-blog&post_type=blog1,8052.4566.5073.96
Blog /wp-admin/edit.php?post_type=blog1,4952.7968.4670.62

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • The plugin did not uninstall gracefully
    • > User notice in wp-includes/functions.php+5663
    wp_register_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 wpvs-style handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Please fix the following server-side errors
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=blog
    • > POST request to /wp-admin/admin-ajax.php
    • > User notice in wp-includes/functions.php+5663
    wp_register_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 wpvs-style handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=blog
    • > POST request to /wp-admin/admin-ajax.php
    • > User notice in wp-includes/functions.php+5663
    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 wpvs-style handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=blog
    • > POST request to /wp-admin/admin-ajax.php
    • > User notice in wp-includes/functions.php+5663
    wp_register_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 wpvs-pickme handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=blog
    • > POST request to /wp-admin/admin-ajax.php
    • > User notice in wp-includes/functions.php+5663
    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 wpvs-pickme handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=blog
    • > POST request to /wp-admin/admin-ajax.php
    • > User notice in wp-includes/functions.php+5663
    wp_register_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 wpvs-tem-style handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=blog
    • > POST request to /wp-admin/admin-ajax.php
    • > User notice in wp-includes/functions.php+5663
    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 wpvs-tem-style handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=blog
    • > POST request to /wp-admin/admin-ajax.php
    • > User notice in wp-includes/functions.php+5663
    wp_enqueue_script 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 jquery handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)

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
  • 5× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/simple-blog/simple-blog.php:14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_header() in wp-content/plugins/simple-blog/simpleBlog/blog-listing-tpl.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_header() in wp-content/plugins/simple-blog/simpleBlog/simple-blog-bkup-2.php:15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_header() in wp-content/plugins/simple-blog/simpleBlog/single-blog-latest-bkup-1.php:15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_header() in wp-content/plugins/simple-blog/simpleBlog/single-blog.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 97% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Attributes that require attention:
  • Donate link: Please fix this invalid URI: ""
The official readme.txt might help

simple-blog/simple-blog.php Passed 13 tests

The main file in "Simple Blog" v. 1.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
71 characters long description:
Declares a plugin that will create a custom post type displaying Blogs.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
No dangerous file extensions were detected14,920 lines of code in 24 files:
LanguageFilesBlank linesComment linesLines of code
CSS75709112,110
JavaScript11841271,752
PHP5163116829
SVG100229

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.38
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%
Functions21
▷ Named functions21100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
10 PNG files occupy 0.03MB with 0.02MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
simpleBlog/simple-blog-images/key2.png2.93KB0.28KB▼ 90.45%
simpleBlog/simple-blog-images/img-sp.png6.17KB2.31KB▼ 62.59%
simpleBlog/simple-blog-images/si.png2.02KB1.04KB▼ 48.70%
simpleBlog/simple-blog-images/social-icons.png6.21KB2.04KB▼ 67.21%
simpleBlog/simple-blog-images/close.png0.29KB0.23KB▼ 20.34%