94% pmc-post-savior

Code Review | PMC Post Savior

WordPress plugin PMC Post Savior scored 94% from 54 tests.

About plugin

  • Plugin page: pmc-post-savior
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.4-3.5
  • WordPress version: 5.8.1
  • First release: Aug 30, 2012
  • Latest release: Oct 3, 2012
  • Number of updates: 7
  • Update frequency: every 5.7 days
  • Top authors: mintindeed (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 1,100 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▲0.03MB] [CPU: ▼144.19ms] Passed 4 tests

Server-side resources used by PMC Post Savior
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.86 ▲0.1436.01 ▲12.89
Dashboard /wp-admin3.08 ▲0.0349.80 ▼4.31
Posts /wp-admin/edit.php3.14 ▲0.0346.54 ▼3.60
Add New Post /wp-admin/post-new.php5.45 ▲0.0299.74 ▼569.15
Media Library /wp-admin/upload.php3.03 ▲0.0334.55 ▲0.31

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 6 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

PMC Post Savior: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,680 ▲8415.87 ▲0.3010.96 ▼1.0045.67 ▼0.38
Dashboard /wp-admin2,968 ▲345.91 ▼0.03165.39 ▼5.62116.01 ▲6.90
Posts /wp-admin/edit.php2,742 ▲32.71 ▼0.0066.54 ▼4.4588.68 ▼3.54
Add New Post /wp-admin/post-new.php1,693 ▲1016.72 ▼2.03415.31 ▼59.64111.22 ▼7.40
Media Library /wp-admin/upload.php1,751 ▼565.04 ▲0.01165.14 ▲14.26118.09 ▼1.13

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Uninstall script ran successfully

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not an exhaustive test

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
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/pmc-post-savior/pmc-post-savior.php:56

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 94% from 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
Please fix the following attributes:
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (PMC Post Savior notices that your login has expired.), #2 (PMC Post Savior presents a pop-up that lets you login again.)
The official readme.txt is a good inspiration

pmc-post-savior/pmc-post-savior.php 92% from 13 tests

The main file in "PMC Post Savior" v. 1.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
It is important to fix the following:
  • Description: Keep the plugin description shorter than 140 characters (currently 172 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Good job! No executable or dangerous file extensions detected183 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript1154981
PHP1345479
CSS11023

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.24
Average class complexity9.00
▷ Minimum class complexity9.00
▷ Maximum class complexity9.00
Average method complexity2.00
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods8
▷ Static methods112.50%
▷ Public methods675.00%
▷ Protected methods112.50%
▷ Private methods112.50%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants00.00%
▷ Class constants2100.00%
▷ Public constants2100.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
No PNG files were detected