10% simple-magazine

Code Review | Simple Magazine

WordPress plugin Simple Magazine scored 10% from 54 tests.

About plugin

  • Plugin page: simple-magazine
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-3.6
  • WordPress version: 5.8.1
  • First release: Aug 13, 2013
  • Latest release: Aug 13, 2013
  • Number of updates: 3
  • Update frequency: every 0.3 days
  • Top authors: christofferok (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 2,175 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
It is recommended to fix the following installer errors
  • Install procedure validation failed for this plugin
    • > Notice in wp-content/plugins/simple-magazine/simple-magazine.php+16
    Constant WP_DEBUG already defined

Server metrics [RAM: ▼1.76MB] [CPU: ▼185.96ms] Passed 4 tests

This is a short check of server-side resources used by Simple Magazine
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /1.87 ▼0.855.65 ▼17.71
Dashboard /wp-admin1.88 ▼1.176.79 ▼39.97
Posts /wp-admin/edit.php1.89 ▼1.226.08 ▼26.00
Add New Post /wp-admin/post-new.php1.88 ▼3.555.38 ▼650.72
Media Library /wp-admin/upload.php1.88 ▼1.126.18 ▼27.16
Issues /wp-admin/edit.php?post_type=simplemag-issue1.896.96
Articles /wp-admin/edit.php?post_type=simplemag-article1.896.34
Simple Magazine /wp-admin/options-general.php?page=test-setting-admin1.895.89

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 11 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

A check of browser resources used by Simple Magazine
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,732 ▲13615.79 ▼0.197.59 ▼0.8646.21 ▼0.58
Dashboard /wp-admin3,008 ▲775.92 ▼0.15131.49 ▼21.56126.41 ▲10.52
Posts /wp-admin/edit.php2,799 ▲602.68 ▼0.0064.12 ▼0.3590.54 ▲1.36
Add New Post /wp-admin/post-new.php1,703 ▲11219.07 ▲0.29384.47 ▲12.03110.77 ▼7.51
Media Library /wp-admin/upload.php1,796 ▼145.01 ▼0.00125.72 ▼19.51153.85 ▲36.48
Issues /wp-admin/edit.php?post_type=simplemag-issue1,4662.6057.4472.31
Articles /wp-admin/edit.php?post_type=simplemag-article1,4802.6357.5978.29
Simple Magazine /wp-admin/options-general.php?page=test-setting-admin1,1072.0952.6294.98

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • This plugin did not uninstall without warnings or errors
    • > Notice in wp-content/plugins/simple-magazine/simple-magazine.php+16
    Constant WP_DEBUG already defined

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
These errors were triggered by the plugin
  • 5 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=test-setting-admin
    • > Notice in wp-content/plugins/simple-magazine/simple-magazine.php+16
    Constant WP_DEBUG already defined
    • > GET request to /wp-admin/options-general.php?page=test-setting-admin
    • > User deprecated in wp-includes/functions.php+5221
    screen_icon is deprecated since version 3.8.0 with no alternative available.
    • > GET request to /wp-admin/options-general.php?page=test-setting-admin
    • > User deprecated in wp-includes/functions.php+5221
    get_screen_icon is deprecated since version 3.8.0 with no alternative available.

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
Please fix the following
  • 2× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/simple-magazine/simple-magazine.php:20
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Query' not found in wp-content/plugins/simple-magazine/issue.php:21

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 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
These attributes need to be fixed:
  • Donate link: Invalid URI found ("")
You can look at the official readme.txt

simple-magazine/simple-magazine.php Passed 13 tests

The principal PHP file in "Simple Magazine" v. 1.0 is loaded by WordPress automatically on each request
30 characters long description:
A simple magazine style plugin

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Success! There were no dangerous files found in this plugin593 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP29324470
CSS2271111
Markdown15012

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.25
Average class complexity11.50
▷ Minimum class complexity4.00
▷ Maximum class complexity19.00
Average method complexity1.95
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods22
▷ Static methods00.00%
▷ Public methods22100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants7
▷ Global constants7100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
4 PNG files occupy 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/icon-64.png1.52KB0.53KB▼ 64.93%
images/icon-16.png1.20KB0.43KB▼ 64.39%
images/arrow-r.png1.91KB0.95KB▼ 50.28%
images/arrow-l.png1.96KB0.99KB▼ 49.55%