84% vikoder-posts-block

Code Review | Posts Block by Vikoder

WordPress plugin Posts Block by Vikoder scored84%from 54 tests.

About plugin

  • Plugin page: vikoder-posts-block
  • Plugin version: 1.1.0
  • PHP compatiblity: 5.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.0
  • WordPress version: 6.3.1
  • First release: Dec 13, 2018
  • Latest release: Dec 18, 2018
  • Number of updates: 6
  • Update frequency: every 1.0 days
  • Top authors: victorfreitas (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /772 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.10MB] [CPU: ▼1.93ms] Passed 4 tests

This is a short check of server-side resources used by Posts Block by Vikoder
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.56 ▲0.1135.97 ▼4.21
Dashboard /wp-admin3.40 ▲0.0948.93 ▼0.03
Posts /wp-admin/edit.php3.51 ▲0.1647.75 ▲0.54
Add New Post /wp-admin/post-new.php6.00 ▲0.1284.04 ▼4.02
Media Library /wp-admin/upload.php3.32 ▲0.0937.64 ▲3.89

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 37 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_theysaidso_widget
can_compress_scripts
db_upgraded
widget_recent-posts
widget_recent-comments

Browser metrics Passed 4 tests

Checking browser requirements for Posts Block by Vikoder
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,910 ▲17513.56 ▼0.726.14 ▲4.3538.05 ▼10.83
Dashboard /wp-admin2,203 ▲155.80 ▲0.8898.15 ▼16.6940.20 ▼6.88
Posts /wp-admin/edit.php2,089 ▲31.98 ▼0.0438.07 ▲2.9133.82 ▼0.14
Add New Post /wp-admin/post-new.php1,535 ▲118.19 ▼4.92610.97 ▼65.8053.13 ▲2.48
Media Library /wp-admin/upload.php1,391 ▲34.20 ▼0.0194.87 ▼5.3344.18 ▲0.68

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
Please fix the following items
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget

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 no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/vikoder-posts-block/i18n/languages/vikoder-posts-block.php:5

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

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
6 plugin tags: card posts, blog, page, latest posts, post...

vikoder-posts-block/vikoder-posts-block.php Passed 13 tests

This is the main PHP file of "Posts Block by Vikoder" version 1.1.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
30 characters long description:
Posts block for the new editor

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Everything looks great! No dangerous files found in this plugin820 lines of code in 22 files:
LanguageFilesBlank linesComment linesLines of code
PHP21220290819
JSON1001

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.39
Average class complexity6.83
▷ Minimum class complexity1.00
▷ Maximum class complexity44.00
Average method complexity2.11
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces7
Interfaces0
Traits0
Classes12
▷ Abstract classes18.33%
▷ Concrete classes1191.67%
▷ Final classes00.00%
Methods64
▷ Static methods1421.88%
▷ Public methods5992.19%
▷ Protected methods34.69%
▷ Private methods23.12%
Functions8
▷ Named functions675.00%
▷ Anonymous functions225.00%
Constants8
▷ Global constants112.50%
▷ Class constants787.50%
▷ Public constants7100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
No PNG files were detected