78% display-yandex-zen-postgrid

Code Review | Yandex.Zen PostGrid

WordPress plugin Yandex.Zen PostGrid scored78%from 54 tests.

About plugin

  • Plugin page: display-yandex-ze...
  • Plugin version: 0.5
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9-6.1.1
  • WordPress version: 6.3.1
  • First release: Jun 21, 2018
  • Latest release: Nov 23, 2022
  • Number of updates: 24
  • Update frequency: every 67.3 days
  • Top authors: stelsrf (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

200+ active /3,728 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.10MB] [CPU: ▼4.21ms] Passed 4 tests

A check of server-side resources used by Yandex.Zen PostGrid
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.60 ▲0.0942.10 ▼2.87
Dashboard /wp-admin3.45 ▲0.1159.28 ▲6.20
Posts /wp-admin/edit.php3.57 ▲0.1752.82 ▲0.24
Add New Post /wp-admin/post-new.php6.03 ▲0.1189.47 ▼18.54
Media Library /wp-admin/upload.php3.38 ▲0.1139.23 ▲4.33
Yandex.Zen PostGrid /wp-admin/options-general.php?page=yg-settings3.3231.67

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 16 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
can_compress_scripts
theysaidso_admin_options
widget_recent-comments
widget_theysaidso_widget
widget_recent-posts

Browser metrics Passed 4 tests

An overview of browser requirements for Yandex.Zen PostGrid
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲3214.27 ▲0.131.83 ▲0.0441.58 ▼3.26
Dashboard /wp-admin2,199 ▲225.62 ▼0.1489.55 ▼1.7439.65 ▼4.29
Posts /wp-admin/edit.php2,104 ▲11.99 ▼0.0336.59 ▼7.7532.38 ▼6.16
Add New Post /wp-admin/post-new.php1,531 ▼623.13 ▲4.90679.06 ▼4.0357.86 ▼7.21
Media Library /wp-admin/upload.php1,404 ▲44.16 ▼0.02115.46 ▲5.7048.30 ▲7.18
Yandex.Zen PostGrid /wp-admin/options-general.php?page=yg-settings9722.1329.5936.39

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
These errors were triggered by the plugin
  • 24 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=yg-settings
    • > Notice in wp-content/plugins/display-yandex-zen-postgrid/yandex-zen-postgrid.php+132
    Trying to access array offset on value of type bool

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
The following issues need your attention
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/display-yandex-zen-postgrid/yandex-zen-postgrid.php:204

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
Attributes that require attention: Please take inspiration from this readme.txt

display-yandex-zen-postgrid/yandex-zen-postgrid.php 92% from 13 tests

Analyzing the main PHP file in "Yandex.Zen PostGrid" version 0.5
Please take the time to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("display-yandex-zen-postgrid.php" instead of "yandex-zen-postgrid.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
No dangerous file extensions were detected2,572 lines of code in 12 files:
LanguageFilesBlank linesComment linesLines of code
PHP75494952,403
Markdown140076
JSON10058
CSS23034
SVG1001

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.51
Average class complexity83.00
▷ Minimum class complexity9.00
▷ Maximum class complexity270.00
Average method complexity5.60
▷ Minimum method complexity1.00
▷ Maximum method complexity87.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes6
▷ Abstract classes00.00%
▷ Concrete classes6100.00%
▷ Final classes00.00%
Methods107
▷ Static methods98.41%
▷ Public methods8680.37%
▷ Protected methods1816.82%
▷ Private methods32.80%
Functions9
▷ Named functions888.89%
▷ Anonymous functions111.11%
Constants47
▷ Global constants3063.83%
▷ Class constants1736.17%
▷ Public constants17100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
There were not PNG files found in your plugin