84% mozscape

Code Review | Mozscape

WordPress plugin Mozscape scored84%from 54 tests.

About plugin

  • Plugin page: mozscape
  • Plugin version: 1.1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-4.4.1
  • WordPress version: 6.3.1
  • First release: Jul 17, 2013
  • Latest release: Jan 26, 2016
  • Number of updates: 14
  • Update frequency: every 66.0 days
  • Top authors: cvbusiness (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active /1,893 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: ▼5.93ms] Passed 4 tests

Server-side resources used by Mozscape
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0042.10 ▲1.16
Dashboard /wp-admin3.31 ▲0.0150.45 ▼6.02
Posts /wp-admin/edit.php3.37 ▲0.0149.43 ▲0.47
Add New Post /wp-admin/post-new.php5.90 ▲0.0186.19 ▼16.33
Media Library /wp-admin/upload.php3.24 ▲0.0136.67 ▼1.83

Server storage [IO: ▲0.02MB] [DB: ▲0.07MB] Passed 3 tests

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 9 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-comments
can_compress_scripts
widget_recent-posts
db_upgraded
theysaidso_admin_options

Browser metrics Passed 4 tests

Mozscape: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲1814.27 ▼0.011.75 ▼0.2543.35 ▼0.23
Dashboard /wp-admin2,195 ▲185.58 ▼0.0685.58 ▼17.3271.94 ▲27.61
Posts /wp-admin/edit.php2,115 ▲151.99 ▼0.0438.41 ▲0.2034.49 ▼5.95
Add New Post /wp-admin/post-new.php6,253 ▲4,72519.08 ▼4.03945.44 ▲338.6461.90 ▼7.76
Media Library /wp-admin/upload.php1,418 ▲184.20 ▲0.0096.63 ▼4.2978.55 ▲37.13

Uninstaller [IO: ▲0.00MB] [DB: ▲0.07MB] 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
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments
    • widget_recent-posts

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)
Everything seems fine, however 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
The following issues need your attention
  • 4× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function current_user_can() in wp-content/plugins/mozscape/admin/pages/dashboard.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/mozscape/admin/class-admin.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/mozscape/mozscape.php:31
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/mozscape/admin/class-config.php:12

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
7 plugin tags: mozscape api, url metrics, search engine optimization, anchor text metrics, link metrics...

mozscape/mozscape.php Passed 13 tests

The main file in "Mozscape" v. 1.1.1 serves as a complement to information provided in readme.txt and as the entry point to the plugin
75 characters long description:
A plugin for WordPress that provides Mozscape API data for posts and pages.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Success! There were no dangerous files found in this plugin316 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP67858316

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.25
Average class complexity11.33
▷ Minimum class complexity3.00
▷ Maximum class complexity16.00
Average method complexity2.35
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods23
▷ Static methods00.00%
▷ Public methods23100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.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
There are no PNG files in this plugin