94% view-published

Code Review | View Published

WordPress plugin View Published scored 94% from 54 tests.

About plugin

  • Plugin page: view-published
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2.2-5.2.2
  • WordPress version: 5.8.1
  • First release: Nov 3, 2015
  • Latest release: Jun 22, 2019
  • Number of updates: 27
  • Update frequency: every 49.4 days
  • Top authors: sunny.r.paradeshi (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active / 720 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▼0.00MB] [CPU: ▼147.00ms] Passed 4 tests

A check of server-side resources used by View Published
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.84 ▲0.0027.05 ▼6.71
Dashboard /wp-admin3.06 ▲0.0146.23 ▲2.61
Posts /wp-admin/edit.php3.11 ▲0.0039.75 ▼8.39
Add New Post /wp-admin/post-new.php5.42 ▼0.0285.34 ▼575.52
Media Library /wp-admin/upload.php3.00 ▲0.0030.91 ▲4.04
View Published /wp-admin/edit.php?post_type=page&post_status=publish3.1041.63

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 5 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

This is an overview of browser requirements for View Published
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,684 ▲11216.03 ▲0.3210.81 ▲1.9749.18 ▲1.71
Dashboard /wp-admin2,975 ▲415.99 ▲0.02169.88 ▲14.13107.96 ▼11.53
Posts /wp-admin/edit.php2,741 ▲22.71 ▼0.0162.60 ▼9.5083.33 ▼3.67
Add New Post /wp-admin/post-new.php1,686 ▲1418.78 ▲0.05406.40 ▲25.44104.77 ▼1.66
Media Library /wp-admin/upload.php1,812 ▼105.01 ▼0.03153.30 ▼5.76110.98 ▼11.19
View Published /wp-admin/edit.php?post_type=page&post_status=publish2,4412.7065.0184.39

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Uninstall script ran successfully

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)
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please take a closer look at the following
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/view-published/view-published.php:12

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Attributes that need to be fixed:
  • Plugin Name: You should set the name of your plugin on the first line ( === view-published === )
  • Screenshots: Please add images for these screenshots: #1 (screenshot-1.jpg shows the submenu from “Pages”), #2 (screenshot-1.jpg shows the loaded page when the url was clicked)
You can look at the official readme.txt

view-published/view-published.php Passed 13 tests

"View Published" version 1.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
140 characters long description:
View Published is a plugin that adds a sub menu under "Pages" that shows only those pages that are published. Get to the right pages faster!

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Good job! No executable or dangerous file extensions detected6 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP13116

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.00
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%
Functions1
▷ Named functions1100.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
1 PNG file occupies 0.01MB with 0.01MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
icon-256x256.png11.67KB4.31KB▼ 63.09%