90% flex-posts

Code Review | Flex Posts - Widget and Gutenberg Block

WordPress plugin Flex Posts - Widget and Gutenberg Block scored90%from 54 tests.

About plugin

  • Plugin page: flex-posts
  • Plugin version: 1.9.0
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2-6.3
  • WordPress version: 6.3.1
  • First release: May 10, 2018
  • Latest release: Aug 22, 2023
  • Number of updates: 21
  • Update frequency: every 92.0 days
  • Top authors: tajam (100%)

Code review

54 tests

User reviews

22 reviews

Install metrics

3,000+ active /36,033 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

Server metrics [RAM: ▲0.20MB] [CPU: ▼1.48ms] Passed 4 tests

An overview of server-side resources used by Flex Posts - Widget and Gutenberg Block
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.66 ▲0.2042.18 ▼2.34
Dashboard /wp-admin3.49 ▲0.1951.09 ▼4.08
Posts /wp-admin/edit.php3.60 ▲0.2549.78 ▲1.78
Add New Post /wp-admin/post-new.php6.11 ▲0.2297.54 ▼1.28
Media Library /wp-admin/upload.php3.42 ▲0.1941.82 ▲5.20

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 19 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-comments
widget_recent-posts
widget_theysaidso_widget
theysaidso_admin_options
db_upgraded
widget_flex-posts-list
can_compress_scripts

Browser metrics Passed 4 tests

Checking browser requirements for Flex Posts - Widget and Gutenberg Block
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,809 ▲6313.67 ▼1.014.60 ▲2.8042.06 ▼0.22
Dashboard /wp-admin2,213 ▲254.84 ▼1.04103.95 ▼4.5139.95 ▼3.29
Posts /wp-admin/edit.php2,096 ▲72.03 ▲0.0237.86 ▲0.1433.47 ▲0.23
Add New Post /wp-admin/post-new.php6,190 ▲4,67619.19 ▲1.77933.96 ▲266.9162.11 ▼0.14
Media Library /wp-admin/upload.php1,398 ▲104.15 ▼0.07100.21 ▼4.0445.94 ▲1.22

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • This plugin does not fully uninstall, leaving 7 options in the database
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_flex-posts-list
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though everything seems fine, this is not an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Everything seems fine, however this is by no means an exhaustive test

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser issues were found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 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
10 plugin tags: magazine, tiles, latest posts, flexbox, category posts...

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

The main PHP file in "Flex Posts - Widget and Gutenberg Block" ver. 1.9.0 adds more information about the plugin and also serves as the entry point for this plugin
81 characters long description:
A widget to display posts with thumbnails in various layouts for any widget area.

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
Good job! No executable or dangerous file extensions detected2,190 lines of code in 16 files:
LanguageFilesBlank linesComment linesLines of code
PHP112583271,382
JavaScript2251587
CSS3443221

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.43
Average class complexity27.50
▷ Minimum class complexity1.00
▷ Maximum class complexity54.00
Average method complexity5.82
▷ Minimum method complexity1.00
▷ Maximum method complexity31.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods11
▷ Static methods00.00%
▷ Public methods1090.91%
▷ Protected methods19.09%
▷ Private methods00.00%
Functions34
▷ Named functions34100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.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
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
public/images/default.png0.43KB0.10KB▼ 75.57%