10% simplicy-post-view

Code Review | Simplicy post view

WordPress plugin Simplicy post view scored10%from 54 tests.

About plugin

  • Plugin page: simplicy-post-view
  • Plugin version: 2.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-4.6
  • WordPress version: 6.3.1
  • First release: Jun 22, 2011
  • Latest release: Aug 19, 2016
  • Number of updates: 32
  • Update frequency: every 59.4 days
  • Top authors: fred91 (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

90+ active /6,267 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The following installer errors require your attention
  • Install procedure validation failed for this plugin
    • > Deprecated in wp-content/plugins/simplicy-post-view/simplicy-post-view.php+49
    Methods with the same name as their class will not be constructors in a future version of PHP; Widget_Simplicy_Post has a deprecated constructor

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

A check of server-side resources used by Simplicy post view
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.24 ▼1.224.66 ▼35.83
Dashboard /wp-admin2.26 ▼1.046.05 ▼46.58
Posts /wp-admin/edit.php2.26 ▼1.105.92 ▼46.89
Add New Post /wp-admin/post-new.php2.26 ▼3.636.92 ▼93.64
Media Library /wp-admin/upload.php2.26 ▼0.976.17 ▼31.03
Simplicy post view /wp-admin/tools.php?page=simplicy-post-view/func/function.php2.266.06

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

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

Browser metrics Passed 4 tests

Simplicy post view: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,808 ▲5814.24 ▼0.161.78 ▲0.0344.84 ▲0.84
Dashboard /wp-admin2,206 ▲265.59 ▲0.0188.01 ▼4.5440.99 ▼8.63
Posts /wp-admin/edit.php2,108 ▲81.98 ▼0.0342.68 ▲4.6038.65 ▲2.14
Add New Post /wp-admin/post-new.php1,533 ▲523.16 ▲0.49699.44 ▲14.3657.19 ▼1.35
Media Library /wp-admin/upload.php1,408 ▲54.14 ▼0.04116.93 ▲17.0147.26 ▲1.13
Simplicy post view /wp-admin/tools.php?page=simplicy-post-view/func/function.php1,0041.9922.2633.63

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • This plugin did not uninstall without warnings or errors
    • > Deprecated in wp-content/plugins/simplicy-post-view/simplicy-post-view.php+49
    Methods with the same name as their class will not be constructors in a future version of PHP; Widget_Simplicy_Post has a deprecated constructor
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_widget_simplicy_post
    • db_upgraded
    • widget_recent-comments

Smoke tests 25% 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
    • > GET request to /wp-admin/tools.php?page=simplicy-post-view/func/function.php
    • > Deprecated in wp-content/plugins/simplicy-post-view/simplicy-post-view.php+49
    Methods with the same name as their class will not be constructors in a future version of PHP; Widget_Simplicy_Post has a deprecated constructor
    • > GET request to /wp-admin/tools.php?page=simplicy-post-view/func/function.php
    • > User notice in wp-includes/functions.php+5905
    Function 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 simplicy-post-view handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
    • > GET request to /wp-admin/tools.php?page=simplicy-post-view/func/function.php
    • > User notice in wp-includes/functions.php+5905
    Function 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 getnaxcssgrid handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
    • > GET request to /wp-admin/tools.php?page=simplicy-post-view/func/function.php
    • > User notice in wp-includes/functions.php+5905
    Function 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 getnaxcssgrid handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
    • > GET request to /wp-admin/tools.php?page=simplicy-post-view/func/function.php
    • > User deprecated in wp-includes/functions.php+5546
    The called constructor method for WP_Widget class in Widget_Simplicy_Post is deprecated since version 4.3.0! Use __construct() instead.
    • > GET request to /wp-admin/tools.php?page=simplicy-post-view/func/function.php
    • > User notice in wp-includes/functions.php+5905
    Function add_submenu_page was called incorrectly. The seventh parameter passed to add_submenu_page() should be numeric representing menu position. Please see Debugging in WordPress for more information. (This message was added in version 5.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
The following issues need your attention
  • 2× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/simplicy-post-view/func/function.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/simplicy-post-view/simplicy-post-view.php:39

User-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
These are user-side errors you should fix
    • > GET request to /wp-admin/tools.php?page=simplicy-post-view/func/function.php
    • > Network (severe)
    wp-content/plugins/simplicy-post-view/css/getnaxcssgrid.css?ver=6.3.1 - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
These attributes need to be fixed:
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (screenshot-1.png), #2 (screenshot-2.png), #3 (screenshot-3.png)
You can look at the official readme.txt

simplicy-post-view/simplicy-post-view.php Passed 13 tests

Analyzing the main PHP file in "Simplicy post view" version 2.1
55 characters long description:
afficher vos article avec miniature dans votre sidebar.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Good job! No executable or dangerous file extensions detected900 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP215475627
PO File286172216
CSS181657

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.22
Average class complexity39.00
▷ Minimum class complexity39.00
▷ Maximum class complexity39.00
Average method complexity10.50
▷ Minimum method complexity1.00
▷ Maximum method complexity33.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions17
▷ Named functions17100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
3 PNG files occupy 0.36MB with 0.23MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-2.png39.79KB15.94KB▼ 59.95%
screenshot-3.png165.53KB57.60KB▼ 65.20%
screenshot-1.png163.56KB56.17KB▼ 65.66%