94% rewp

Code Review | Re:WP

WordPress plugin Re:WP scored 94% from 53 tests.

About plugin

  • Plugin page: rewp
  • Plugin version: 1.0.1
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-5.1
  • WordPress version: 5.8.1
  • First release: Mar 18, 2019
  • Latest release: Apr 3, 2019
  • Number of updates: 8
  • Update frequency: every 2.0 days
  • Top authors: remydcf (100%)

Code review

53 tests

User reviews

1 review

Install metrics

10+ active / 328 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

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

Server-side resources used by Re:WP
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.84 ▲0.1237.21 ▲16.24
Dashboard /wp-admin3.06 ▲0.0144.72 ▲3.74
Posts /wp-admin/edit.php3.11 ▲0.0144.73 ▲0.52
Add New Post /wp-admin/post-new.php5.43 ▼0.0093.02 ▼1,052.44
Media Library /wp-admin/upload.php3.01 ▼0.0035.34 ▼6.64
Re:WP /wp-admin/options-general.php?page=re-wp3.0130.02

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 9 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Re:WP
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,654 ▲4815.80 ▲0.208.47 ▼0.7744.86 ▼3.46
Dashboard /wp-admin2,938 ▲885.89 ▼0.00154.88 ▲10.30101.98 ▼5.24
Posts /wp-admin/edit.php2,711 ▲52.69 ▲0.0165.72 ▲2.9693.75 ▲6.29
Add New Post /wp-admin/post-new.php1,656 ▲318.79 ▲0.03362.53 ▲15.56108.20 ▼1.59
Media Library /wp-admin/upload.php1,783 ▲675.03 ▲0.08151.75 ▼39.02114.23 ▼7.32
Re:WP /wp-admin/options-general.php?page=re-wp1,1322.0958.2877.25

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The plugin uninstalled successfully, without leaving any zombie files or tables

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Almost there! Just fix the following items
  • 2× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/rewp/admin/views/settings.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/rewp/plugin.php:9

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 Passed 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
No tags were detected

rewp/rewp.php Passed 13 tests

"Re:WP" version 1.0.1's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
47 characters long description:
Let's make WordPress a little bit more awesome!

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
There were no executable files found in this plugin201 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP753135201

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.28
Average class complexity3.00
▷ Minimum class complexity1.00
▷ Maximum class complexity9.00
Average method complexity1.80
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods10
▷ Static methods00.00%
▷ Public methods880.00%
▷ Protected methods00.00%
▷ Private methods220.00%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 1 test

Image compression Passed 1 test

Often times overlooked, PNG files can occupy unnecessary space in your plugin
There were not PNG files found in your plugin