83% cresta-posts-box

Code Review | Cresta Posts Box

WordPress plugin Cresta Posts Box scored83%from 54 tests.

About plugin

  • Plugin page: cresta-posts-box
  • Plugin version: 1.3.4
  • PHP version: 7.4.16
  • WordPress compatibility: 3.9-6.4
  • WordPress version: 6.3.1
  • First release: Dec 25, 2015
  • Latest release: Nov 8, 2023
  • Number of updates: 108
  • Update frequency: every 26.6 days
  • Top authors: CrestaProject (100%)

Code review

54 tests

User reviews

6 reviews

Install metrics

1,000+ active /26,759 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.13MB] [CPU: ▼5.97ms] Passed 4 tests

An overview of server-side resources used by Cresta Posts Box
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.59 ▲0.1236.51 ▼2.98
Dashboard /wp-admin3.44 ▲0.1344.57 ▼6.11
Posts /wp-admin/edit.php3.55 ▲0.1948.59 ▲5.64
Add New Post /wp-admin/post-new.php6.02 ▲0.1384.92 ▼14.39
Media Library /wp-admin/upload.php3.36 ▲0.1334.36 ▼0.41

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

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

Browser metrics Passed 4 tests

A check of browser resources used by Cresta Posts Box
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,802 ▲4014.72 ▲0.371.66 ▼0.0939.47 ▼4.42
Dashboard /wp-admin2,210 ▲325.63 ▼0.0184.35 ▼24.1536.44 ▼7.04
Posts /wp-admin/edit.php2,112 ▲91.95 ▲0.0139.25 ▼1.0836.61 ▼0.92
Add New Post /wp-admin/post-new.php6,234 ▲4,70925.84 ▲2.59925.96 ▲321.8953.66 ▲4.88
Media Library /wp-admin/upload.php1,412 ▲94.16 ▼0.0398.98 ▼3.1639.83 ▼3.40

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options
    • db_upgraded

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 | 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 items
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/cresta-posts-box/uninstall.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Attributes that need to be fixed:
  • Screenshots: Add images for these screenshots: #1 (Cresta Posts Box Settings Page), #2 (Cresta Posts Box Example in a post)
  • Tags: Too many tags (15 tag instead of maximum 10); only the first 5 tags are used in your directory listing
The official readme.txt is a good inspiration

cresta-posts-box/cresta-posts-box.php 92% from 13 tests

"Cresta Posts Box" version 1.3.4's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please take the time to fix the following:
  • Description: The description should be shorter than 140 characters (currently 241 characters long)

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
Good job! No executable or dangerous file extensions detected1,080 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
PHP44028717
CSS324261
JavaScript310895
XML1007

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.28
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%
Functions16
▷ Named functions16100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
6 compressed PNG files occupy 0.17MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/banner-cresta-social-share-counter.png60.60KB63.49KB0.00%
images/banner-cresta-whatsapp-chat.png6.98KB7.38KB0.00%
images/banner-cresta-posts-box-pro.png29.81KB31.69KB0.00%
screenshot-1.png47.07KB46.74KB▼ 0.72%
images/5-stars.png0.34KB0.39KB0.00%