84% impactpubs

Code Review | ImpactPubs

WordPress plugin ImpactPubs scored84%from 54 tests.

About plugin

  • Plugin page: impactpubs
  • Plugin version: 3.3.1
  • PHP version: 7.4.16
  • WordPress compatibility: 2.8-4.9
  • WordPress version: 6.3.1
  • First release: Aug 4, 2013
  • Latest release: Nov 18, 2017
  • Number of updates: 33
  • Update frequency: every 47.9 days
  • Top authors: CAYdenberg (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /3,279 total downloads

Benchmarks

Plugin footprint 83% from 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 gracefully, with no errors

Server metrics [RAM: ▲0.01MB] [CPU: ▼3.88ms] Passed 4 tests

A check of server-side resources used by ImpactPubs
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0239.63 ▲2.58
Dashboard /wp-admin3.31 ▲0.0148.56 ▼0.07
Posts /wp-admin/edit.php3.36 ▲0.0141.74 ▼2.25
Add New Post /wp-admin/post-new.php5.91 ▲0.0381.77 ▼15.77
Media Library /wp-admin/upload.php3.24 ▲0.0139.42 ▲5.40

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 8 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-posts
can_compress_scripts
db_upgraded
theysaidso_admin_options
widget_recent-comments

Browser metrics Passed 4 tests

Checking browser requirements for ImpactPubs
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,903 ▲15713.58 ▼1.105.92 ▲4.2041.07 ▼0.83
Dashboard /wp-admin2,226 ▲384.88 ▼1.13110.93 ▲8.8941.02 ▼2.38
Posts /wp-admin/edit.php2,106 ▲172.02 ▼0.0334.18 ▼1.0333.17 ▼0.94
Add New Post /wp-admin/post-new.php1,531 ▼217.41 ▼5.68668.89 ▲9.0270.29 ▲16.82
Media Library /wp-admin/upload.php1,405 ▲174.27 ▲0.0795.44 ▼12.1841.03 ▼3.64

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts

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)
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 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
Almost there! Just fix the following items
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/impactpubs/wp-impactpubs.php:33

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 96% from 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
5 plugin tags: publications, citation, academia, cv, science

impactpubs/wp-impactpubs.php 92% from 13 tests

The main PHP script in "ImpactPubs" version 3.3.1 is automatically included on every request by WordPress
It is important to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("impactpubs.php" instead of "wp-impactpubs.php")

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
No dangerous file extensions were detected635 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP275230505
Markdown160065
CSS111054
JavaScript12111

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.43
Average class complexity24.33
▷ Minimum class complexity1.00
▷ Maximum class complexity56.00
Average method complexity6.83
▷ Minimum method complexity1.00
▷ Maximum method complexity17.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods12
▷ Static methods00.00%
▷ Public methods12100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions13
▷ Named functions13100.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
2 PNG files occupy 0.06MB with 0.03MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png20.17KB8.38KB▼ 58.48%
screenshot-2.png39.59KB19.49KB▼ 50.76%